@ -77,7 +77,7 @@ public interface LCGrpUWDealBLSQL {
SQLwithBindVariables updateInitNumPeopleAndPeoPlesAndSumNumPeople ( @Param ( "tInsuredType" ) ArrayList < String > tInsuredType ,
SQLwithBindVariables updateInitNumPeopleAndPeoPlesAndSumNumPeople ( @Param ( "tInsuredType" ) ArrayList < String > tInsuredType ,
@Param ( "mGrpPropNo" ) String mGrpPropNo ) ;
@Param ( "mGrpPropNo" ) String mGrpPropNo ) ;
@SQL ( value = "select 1 from LCGUWMaster a,LCGUWTrace b where a.grpcontno=b.grpcontno and a.uwno=b.uwno and (b.UWConclu is null or b.UWConclu='' ) " +
@SQL ( value = "select 1 from LCGUWMaster a,LCGUWTrace b where a.grpcontno=b.grpcontno and a.uwno=b.uwno and (b.UWConclu is null or b.UWConclu=null ) " +
" and a.grpcontno='?mGrpPropNo?'" )
" and a.grpcontno='?mGrpPropNo?'" )
String existsByGrpContNoAndUWNoAndUWConcluIsNULL ( @Param ( "mGrpPropNo" ) String mGrpPropNo ) ;
String existsByGrpContNoAndUWNoAndUWConcluIsNULL ( @Param ( "mGrpPropNo" ) String mGrpPropNo ) ;
@ -120,9 +120,9 @@ public interface LCGrpUWDealBLSQL {
with tprem as
with tprem as
( select
( select
aa . ContPlanCode ContPlanCode , aa . dutycode dutycode ,
aa . ContPlanCode ContPlanCode , aa . dutycode dutycode ,
func_cal_vttovat ( aa . prem , ' ? tOtherNoType ? ' , aa . riskcode , ' ? tManageCom ? ',' ', '? text1 ? ',' ? text1 ? ' ) NetAmount ,
func_cal_vttovat ( aa . prem , ' ? tOtherNoType ? ' , aa . riskcode , ' ? tManageCom ? ' , null , ' ? text1 ? ',' ? text1 ? ' ) NetAmount ,
func_cal_vttovat ( aa . prem , ' ? tOtherNoType ? ' , aa . riskcode , ' ? tManageCom ? ',' ', '? text2 ? ',' ? text1 ? ' ) TaxAmount ,
func_cal_vttovat ( aa . prem , ' ? tOtherNoType ? ' , aa . riskcode , ' ? tManageCom ? ' , null , ' ? text2 ? ',' ? text1 ? ' ) TaxAmount ,
func_cal_vttovat ( aa . prem , ' ? tOtherNoType ? ' , aa . riskcode , ' ? tManageCom ? ',' ', '? text3 ? ',' ? text1 ? ' ) Tax
func_cal_vttovat ( aa . prem , ' ? tOtherNoType ? ' , aa . riskcode , ' ? tManageCom ? ' , null , ' ? text3 ? ',' ? text1 ? ' ) Tax
from
from
(
(
select
select
@ -139,7 +139,7 @@ public interface LCGrpUWDealBLSQL {
and t3 . prem is not null
and t3 . prem is not null
and t3 . prem ! = 0
and t3 . prem ! = 0
and t2 . grpcontno = ' ? mGrpPropNo ? ' ) aa )
and t2 . grpcontno = ' ? mGrpPropNo ? ' ) aa )
select ' ? tGetNoticeNo ? ',' ? ti ? ',' ? tGrpContNo ? ' , t2 . grppolno , t1 . contno , t1 . polno , ' ? text2 ? ' , t1 . dutycode , t3 . payplancode , ' ? tOtherNoType ? ' , t2 . riskcode , ' ? tAppntNo ? ',' ' , t3 . prem , to_number ( ' ? tNumPayIntv ? ' ) , ' ? payDate ? ',' ? text0 ? ',' ? tManageCom ? ',' ? tComCode ? ',' ? mOperator ? ' , to_date ( ' ? mCurrentDate ? ',' yyyy - MM - dd ' ) , ' ? mCurrentTime ? ',' ? mOperator ? ' , to_date ( ' ? mCurrentDate ? ',' yyyy - MM - dd ' ) , ' ? mCurrentTime ? ' , t2 . currency , tp . NetAmount , tp . TaxAmount , tp . Tax
select ' ? tGetNoticeNo ? ',' ? ti ? ',' ? tGrpContNo ? ' , t2 . grppolno , t1 . contno , t1 . polno , ' ? text2 ? ' , t1 . dutycode , t3 . payplancode , ' ? tOtherNoType ? ' , t2 . riskcode , ' ? tAppntNo ? ' , null , t3 . prem , CAST ( ? tNumPayIntv ? AS NUMBER ) , ' ? payDate ? ',' ? text0 ? ',' ? tManageCom ? ',' ? tComCode ? ',' ? mOperator ? ' , to_date ( ' ? mCurrentDate ? ',' yyyy - MM - dd ' ) , ' ? mCurrentTime ? ',' ? mOperator ? ' , to_date ( ' ? mCurrentDate ? ',' yyyy - MM - dd ' ) , ' ? mCurrentTime ? ' , t2 . currency , tp . NetAmount , tp . TaxAmount , tp . Tax
from lcduty t1 , lcpol t2 , lcprem t3 , tprem tp
from lcduty t1 , lcpol t2 , lcprem t3 , tprem tp
where t1 . polno = t2 . polno and t1 . dutycode = t3 . dutycode and t2 . polstate < > ' ? tPolState ? ' and t1 . polno = t3 . polno and t1 . contno = t3 . contno and t3 . prem is not null and t3 . prem ! = 0 and tp . dutycode = t1 . DutyCode and tp . ContPlanCode = t2 . ContPlanCode and t2 . grpcontno = ' ? mGrpPropNo ? '
where t1 . polno = t2 . polno and t1 . dutycode = t3 . dutycode and t2 . polstate < > ' ? tPolState ? ' and t1 . polno = t3 . polno and t1 . contno = t3 . contno and t3 . prem is not null and t3 . prem ! = 0 and tp . dutycode = t1 . DutyCode and tp . ContPlanCode = t2 . ContPlanCode and t2 . grpcontno = ' ? mGrpPropNo ? '
"" " )
"" " )
@ -167,8 +167,8 @@ public interface LCGrpUWDealBLSQL {
@SQL ( value = "insert into ljspayperson (getnoticeno, paycount, grpcontno, grppolno, contno, polno, payaimclass," +
@SQL ( value = "insert into ljspayperson (getnoticeno, paycount, grpcontno, grppolno, contno, polno, payaimclass," +
" dutycode, payplancode, paytype, riskcode, appntno, endorsementno, sumduepaymoney, payintv, paydate," +
" dutycode, payplancode, paytype, riskcode, appntno, endorsementno, sumduepaymoney, payintv, paydate," +
" getflag, managecom, comcode, operator, makedate, maketime, modifyoperator, modifydate, modifytime,Currency,NetAmount,TaxAmount,Tax)" +
" getflag, managecom, comcode, operator, makedate, maketime, modifyoperator, modifydate, modifytime,Currency,NetAmount,TaxAmount,Tax)" +
" select '?tGetNoticeNo?','?ti?','?tGrpContNo?',t2.grppolno,t1.contno,t1.polno,'?text2?',t1.dutycode,t3.payplancode,'?tOtherNoType?',t2.riskcode,'?tAppntNo?','' ,t3.periodprem," +
" select '?tGetNoticeNo?','?ti?','?tGrpContNo?',t2.grppolno,t1.contno,t1.polno,'?text2?',t1.dutycode,t3.payplancode,'?tOtherNoType?',t2.riskcode,'?tAppntNo?',null ,t3.periodprem," +
" to_number('?tNumPayIntv?' ),'?payDate?','?text0?','?tManageCom?','?tComCode?'," +
" CAST(?tNumPayIntv? AS NUMBER ),'?payDate?','?text0?','?tManageCom?','?tComCode?'," +
" '?mOperator?',to_date('?mCurrentDate?','yyyy-MM-dd'),'?mCurrentTime?','?mOperator?',to_date('?mCurrentDate?','yyyy-MM-dd'),'?mCurrentTime?',t2.currency, " +
" '?mOperator?',to_date('?mCurrentDate?','yyyy-MM-dd'),'?mCurrentTime?','?mOperator?',to_date('?mCurrentDate?','yyyy-MM-dd'),'?mCurrentTime?',t2.currency, " +
" func_cal_vttovat(t3.periodprem,'?tOtherNoType?',t2.riskcode,'?tManageCom?',t2.currency,'?text1?','?text1?'), " +
" func_cal_vttovat(t3.periodprem,'?tOtherNoType?',t2.riskcode,'?tManageCom?',t2.currency,'?text1?','?text1?'), " +
" func_cal_vttovat(t3.periodprem,'?tOtherNoType?',t2.riskcode,'?tManageCom?',t2.currency,'?text2?','?text1?'), " +
" func_cal_vttovat(t3.periodprem,'?tOtherNoType?',t2.riskcode,'?tManageCom?',t2.currency,'?text2?','?text1?'), " +
@ -198,24 +198,32 @@ public interface LCGrpUWDealBLSQL {
//fixme func_cal_vttovat在oracle里失效 by zhanghanxu 2020/04/13
//fixme func_cal_vttovat在oracle里失效 by zhanghanxu 2020/04/13
@SQL ( value = "" "
@SQL ( value = "" "
insert into ljspayperson ( getnoticeno , paycount , grpcontno , grppolno , contno , polno , payaimclass , dutycode , payplancode , paytype , riskcode , appntno , endorsementno , sumduepaymoney , payintv , paydate , getflag , managecom , comcode , operator , makedate , maketime , modifyoperator , modifydate , modifytime , Currency , NetAmount , TaxAmount , Tax , ISMixedPay )
insert into ljspayperson ( getnoticeno , paycount , grpcontno , grppolno , contno , polno , payaimclass , dutycode , payplancode , paytype , riskcode , appntno , endorsementno , sumduepaymoney , payintv , paydate , getflag , managecom , comcode , operator , makedate , maketime , modifyoperator , modifydate , modifytime , Currency , NetAmount , TaxAmount , Tax , ISMixedPay )
with tprem as
with tprem as
( select
( select
aa . ContPlanCode ContPlanCode , aa . dutycode dutycode ,
aa . ContPlanCode ContPlanCode , aa . dutycode dutycode ,
func_cal_vttovat ( aa . EnterPriseBurden , ' ? tOtherNoType ? ' , aa . riskcode , ' ? tManageCom ? ',' ',' ? text1 ? ',' ? text1 ? ' ) NetAmount ,
func_cal_vttovat ( aa . EnterPriseBurden , ' ? tOtherNoType ? ' , aa . riskcode , ' ? tManageCom ? ' , null , ' ? text1 ? ',' ? text1 ? ' ) NetAmount ,
func_cal_vttovat ( aa . EnterPriseBurden , ' ? tOtherNoType ? ' , aa . riskcode , ' ? tManageCom ? ',' ',' ? text2 ? ',' ? text1 ? ' ) TaxAmount ,
func_cal_vttovat ( aa . EnterPriseBurden , ' ? tOtherNoType ? ' , aa . riskcode , ' ? tManageCom ? ' , null , ' ? text2 ? ',' ? text1 ? ' ) TaxAmount ,
func_cal_vttovat ( aa . EnterPriseBurden , ' ? tOtherNoType ? ' , aa . riskcode , ' ? tManageCom ? ',' ',' ? text3 ? ',' ? text1 ? ' ) Tax
func_cal_vttovat ( aa . EnterPriseBurden , ' ? tOtherNoType ? ' , aa . riskcode , ' ? tManageCom ? ' , null , ' ? text3 ? ',' ? text1 ? ' ) Tax
from
from
(
(
select
select
distinct
distinct
t2 . ContPlanCode , t1 . dutycode , t4 . EnterPriseBurden , t2 . riskcode
t2 . ContPlanCode , t1 . dutycode , t4 . EnterPriseBurden , t2 . riskcode
from
from
lcduty t1 , lcpol t2 , lcprem t3 , lccontplandetail t4
lcduty t1 , lcpol t2 , lcprem t3 , lccontplandetail t4
where
where
t1 . polno = t2 . polno and t1 . dutycode = t3 . dutycode and t2 . polstate < > ' ? tPolState ? ' and t1 . polno = t3 . polno and t1 . contno = t3 . contno and t4 . PolicyNo = t2 . GrpContNo and t4 . SysPlanCode = t2 . ContPlanCode and t4 . DutyCode = t3 . DutyCode and ( t4 . FreeRisk is null or t4 . FreeRisk = 0 ) and t2 . grpcontno = ' ? mGrpPropNo ? ' ) aa )
t1 . polno = t2 . polno and t1 . dutycode = t3 . dutycode and t2 . polstate < > ' ? tPolState ? ' and t1 . polno = t3 . polno and t1 . contno = t3 . contno and t4 . PolicyNo = t2 . GrpContNo and t4 . SysPlanCode = t2 . ContPlanCode and t4 . DutyCode = t3 . DutyCode and ( t4 . FreeRisk is null or t4 . FreeRisk = 0 ) and t2 . grpcontno = ' ? mGrpPropNo ? ' ) aa )
select ' ? tGetNoticeNo ? ',' ? ti ? ',' ? tGrpContNo ? ' , t2 . grppolno , t1 . contno , t1 . polno , ' ? text2 ? ' , t1 . dutycode , t3 . payplancode , ' ? tOtherNoType ? ' , t2 . riskcode , ' ? tAppntNo ? ',' ' , t4 . EnterPriseBurden , to_number ( ' ? tNumPayIntv ? ' ) , ' ? payDate ? ',' ? text0 ? ',' ? tManageCom ? ',' ? tComCode ? ',' ? mOperator ? ' , to_date ( ' ? mCurrentDate ? ',' yyyy - MM - dd ' ) , ' ? mCurrentTime ? ',' ? mOperator ? ' , to_date ( ' ? mCurrentDate ? ',' yyyy - MM - dd ' ) , ' ? mCurrentTime ? ' , t2 . currency , tp . NetAmount , tp . TaxAmount , tp . Tax , ' ? mISMixedPay ? '
select ' ? tGetNoticeNo ? ',' ? ti ? ',' ? tGrpContNo ? ' , t2 . grppolno , t1 . contno , t1 . polno , ' ? text2 ? ' , t1 . dutycode , t3 . payplancode , ' ? tOtherNoType ? ' , t2 . riskcode , ' ? tAppntNo ? ' , null , t4 . EnterPriseBurden ,
from lcduty t1 , lcpol t2 , lcprem t3 , lccontplandetail t4 , tprem tp
cast ( ? tNumPayIntv ? as integer ) ,
to_date ( ' ? payDate ? ',' YYYY - MM - DD ' ) ,
' ? text0 ? ',' ? tManageCom ? ',' ? tComCode ? ',' ? mOperator ? ' ,
to_date ( ' ? mCurrentDate ? ',' YYYY - MM - DD ' ) ,
' ? mCurrentTime ? ',' ? mOperator ? ' ,
to_date ( ' ? mCurrentDate ? ',' YYYY - MM - DD ' ) ,
' ? mCurrentTime ? ' ,
t2 . currency , tp . NetAmount , tp . TaxAmount , tp . Tax , ' ? mISMixedPay ? '
from lcduty t1 , lcpol t2 , lcprem t3 , lccontplandetail t4 , tprem tp
where t1 . polno = t2 . polno and t1 . dutycode = t3 . dutycode and t2 . polstate < > ' ? tPolState ? ' and t1 . polno = t3 . polno and t1 . contno = t3 . contno and t4 . PolicyNo = t2 . GrpContNo and t4 . SysPlanCode = t2 . ContPlanCode and t4 . DutyCode = t3 . DutyCode and ( t4 . FreeRisk is null or t4 . FreeRisk = 0 ) and tp . dutycode = t1 . DutyCode and tp . ContPlanCode = t2 . ContPlanCode and t2 . grpcontno = ' ? mGrpPropNo ? '
where t1 . polno = t2 . polno and t1 . dutycode = t3 . dutycode and t2 . polstate < > ' ? tPolState ? ' and t1 . polno = t3 . polno and t1 . contno = t3 . contno and t4 . PolicyNo = t2 . GrpContNo and t4 . SysPlanCode = t2 . ContPlanCode and t4 . DutyCode = t3 . DutyCode and ( t4 . FreeRisk is null or t4 . FreeRisk = 0 ) and tp . dutycode = t1 . DutyCode and tp . ContPlanCode = t2 . ContPlanCode and t2 . grpcontno = ' ? mGrpPropNo ? '
"" " )
"" " )
SQLwithBindVariables insertLJSPayPersonByLCDuty_LCPol_LCPremAndPolStateNotGrpContNoAndMore3 ( @Param ( "text0" ) String text0 ,
SQLwithBindVariables insertLJSPayPersonByLCDuty_LCPol_LCPremAndPolStateNotGrpContNoAndMore3 ( @Param ( "text0" ) String text0 ,
@ -240,13 +248,12 @@ public interface LCGrpUWDealBLSQL {
@Param ( "mISMixedPay" ) String mISMixedPay ) ;
@Param ( "mISMixedPay" ) String mISMixedPay ) ;
//fixme func_cal_vttovat在oracle里失效 by zhanghanxu 2020/04/13
//fixme func_cal_vttovat在oracle里失效 by zhanghanxu 2020/04/13
@SQL ( value = "insert into ljspayperson (getnoticeno, paycount, grpcontno, grppolno, contno, polno, payaimclass, dutycode,payplancode, paytype, riskcode, appntno, endorsementno, sumduepaymoney, payintv, paydate, getflag, managecom, comcode," +
@SQL ( value = "insert into ljspayperson (getnoticeno, paycount, grpcontno, grppolno, contno, polno, payaimclass, dutycode,payplancode, paytype, riskcode, appntno, endorsementno, sumduepaymoney, payintv, paydate, getflag, managecom, comcode," +
" operator, makedate, maketime, modifyoperator, modifydate, modifytime,Currency,NetAmount,TaxAmount,Tax,ISMixedPay) select '?tGetNoticeNo?','?ti?','?tGrpContNo?',t2.grppolno,t1.contno,t1.polno,'?text2?',t1.dutycode,t3.payplancode,'?tOtherNoType?',t2.riskcode,'?tAppntNo?','' ,t4.PersonBurden ," +
" operator, makedate, maketime, modifyoperator, modifydate, modifytime,Currency,NetAmount,TaxAmount,Tax,ISMixedPay) select '?tGetNoticeNo?','?ti?','?tGrpContNo?',t2.grppolno,t1.contno,t1.polno,'?text2?',t1.dutycode,t3.payplancode,'?tOtherNoType?',t2.riskcode,'?tAppntNo?',null ,t4.PersonBurden ," +
" to_number('?tNumPayIntv?' ),'?payDate?','?text0?','?tManageCom?','?tComCode?','?mOperator?',to_date('?mCurrentDate?','yyyy-MM-dd'),'?mCurrentTime?','?mOperator?',to_date('?mCurrentDate?','yyyy-MM-dd '),'?mCurrentTime?' , t2.currency, " +
" cast(?tNumPayIntv? as integer ),'?payDate?','?text0?','?tManageCom?','?tComCode?','?mOperator?',to_date('?mCurrentDate?','YYYY-MM-DD'),'?mCurrentTime?','?mOperator?',to_date('?mCurrentDate?','YYYY-MM-DD '),'?mCurrentTime?' , t2.currency, " +
" func_cal_vttovat(( t4.PersonBurden ) ,'?tOtherNoType?',t2.riskcode,'?tManageCom?',t2.currency,'?text1?','?text1?')," +
" func_cal_vttovat(t4.PersonBurden ,'?tOtherNoType?',t2.riskcode,'?tManageCom?',t2.currency,'?text1?','?text1?')," +
" func_cal_vttovat(( t4.PersonBurden ) ,'?tOtherNoType?',t2.riskcode,'?tManageCom?',t2.currency,'?text2?','?text1?')," +
" func_cal_vttovat(t4.PersonBurden ,'?tOtherNoType?',t2.riskcode,'?tManageCom?',t2.currency,'?text2?','?text1?')," +
" func_cal_vttovat(( t4.PersonBurden ) ,'?tOtherNoType?',t2.riskcode,'?tManageCom?',t2.currency,'?text3?','?text1?'),'?mISMixedPay?' " +
" func_cal_vttovat(t4.PersonBurden ,'?tOtherNoType?',t2.riskcode,'?tManageCom?',t2.currency,'?text3?','?text1?'),'?mISMixedPay?' " +
" from lcduty t1,lcpol t2,lcprem t3,lccontplandetail t4 where t1.polno = t2.polno and t1.dutycode=t3.dutycode and t2.polstate<>'?tPolState?' and t1.polno=t3.polno and t1.contno=t3.contno and t4.PolicyNo =t2.GrpContNo and t4.SysPlanCode =t2.ContPlanCode and t4.DutyCode =t3.DutyCode " +
" from lcduty t1,lcpol t2,lcprem t3,lccontplandetail t4 where t1.polno = t2.polno and t1.dutycode=t3.dutycode and t2.polstate<>'?tPolState?' and t1.polno=t3.polno and t1.contno=t3.contno and t4.PolicyNo =t2.GrpContNo and t4.SysPlanCode =t2.ContPlanCode and t4.DutyCode =t3.DutyCode " +
//去除赠险数据
" and (t4.FreeRisk is null or t4.FreeRisk =0) " +
" and (t4.FreeRisk is null or t4.FreeRisk =0) " +
" and t2.contno ='?mContNo?'" )
" and t2.contno ='?mContNo?'" )
SQLwithBindVariables insertLJSPayPersonByLCDuty_LCPol_LCPremAndPolStateNotGrpContNoAndMore4 ( @Param ( "text0" ) String text0 ,
SQLwithBindVariables insertLJSPayPersonByLCDuty_LCPol_LCPremAndPolStateNotGrpContNoAndMore4 ( @Param ( "text0" ) String text0 ,
@ -275,7 +282,7 @@ public interface LCGrpUWDealBLSQL {
@SQL ( value = "insert into ljspaycont (getnoticeno, paycount, grpcontno, contno, paytype, appntno, sumduepaymoney, payintv, paydate," +
@SQL ( value = "insert into ljspaycont (getnoticeno, paycount, grpcontno, contno, paytype, appntno, sumduepaymoney, payintv, paydate," +
" enteraccdate, confdate, customername, idtype, idno, bankcode, bankaccno, accname, bankonthewayflag, banksuccflag," +
" enteraccdate, confdate, customername, idtype, idno, bankcode, bankaccno, accname, bankonthewayflag, banksuccflag," +
" sendbankcount, state, sendrelano, managecom, comcode, operator, makedate, maketime, modifyoperator, modifydate,modifytime,NetAmount,TaxAmount,Tax)" +
" sendbankcount, state, sendrelano, managecom, comcode, operator, makedate, maketime, modifyoperator, modifydate,modifytime,NetAmount,TaxAmount,Tax)" +
" select t1.getnoticeno, t1.paycount, t1.grpcontno, t1.contno, t1.paytype, t1.appntno, sum(t1.sumduepaymoney), t1.payintv, t1.paydate,null,null,'','','','','','','?text0?','',null,'?tPayState?','' ,t1.managecom, t1.comcode," +
" select t1.getnoticeno, t1.paycount, t1.grpcontno, t1.contno, t1.paytype, t1.appntno, sum(t1.sumduepaymoney), t1.payintv, t1.paydate,null,null,null,null,null,null,null,null,'?text0?',null,null,'?tPayState?',null ,t1.managecom, t1.comcode," +
" t1.operator, t1.makedate, t1.maketime, t1.modifyoperator, t1.modifydate, t1.modifytime, (case when sum(t1.NetAmount) is null then 0 else sum(t1.NetAmount) end ), sum(t1.TaxAmount), max(t1.Tax) " +
" t1.operator, t1.makedate, t1.maketime, t1.modifyoperator, t1.modifydate, t1.modifytime, (case when sum(t1.NetAmount) is null then 0 else sum(t1.NetAmount) end ), sum(t1.TaxAmount), max(t1.Tax) " +
" from ljspayperson t1 where t1.grpcontno='?tGrpContNo?' group by t1.getnoticeno, t1.paycount, t1.grpcontno, t1.contno, t1.paytype, t1.appntno," +
" from ljspayperson t1 where t1.grpcontno='?tGrpContNo?' group by t1.getnoticeno, t1.paycount, t1.grpcontno, t1.contno, t1.paytype, t1.appntno," +
" t1.payintv, t1.paydate, t1.managecom, t1.comcode,t1.operator, t1.makedate, t1.maketime, t1.modifyoperator, t1.modifydate, t1.modifytime having sum(t1.sumduepaymoney)<>0" )
" t1.payintv, t1.paydate, t1.managecom, t1.comcode,t1.operator, t1.makedate, t1.maketime, t1.modifyoperator, t1.modifydate, t1.modifytime having sum(t1.sumduepaymoney)<>0" )
@ -284,7 +291,7 @@ public interface LCGrpUWDealBLSQL {
@Param ( "tGrpContNo" ) String tGrpContNo ) ;
@Param ( "tGrpContNo" ) String tGrpContNo ) ;
@SQL ( value = "insert into ljspaygrp (getnoticeno, paycount, grpcontno, grppolno, busstype, riskcode, appntno, endorsementno, sumduepaymoney, payintv, paydate, paytype, managecom, comcode, operator, makedate, maketime," +
@SQL ( value = "insert into ljspaygrp (getnoticeno, paycount, grpcontno, grppolno, busstype, riskcode, appntno, endorsementno, sumduepaymoney, payintv, paydate, paytype, managecom, comcode, operator, makedate, maketime," +
" modifyoperator, modifydate, modifytime, Currency, NetAmount, TaxAmount, Tax) select t1.getnoticeno, t1.paycount, t1.grpcontno, t1.grppolno, t1.paytype, t1.riskcode, t1.appntno, '' , sum(t1.sumduepaymoney) sumduepaymoney," +
" modifyoperator, modifydate, modifytime, Currency, NetAmount, TaxAmount, Tax) select t1.getnoticeno, t1.paycount, t1.grpcontno, t1.grppolno, t1.paytype, t1.riskcode, t1.appntno, null , sum(t1.sumduepaymoney) sumduepaymoney," +
" t1.payintv, t1.paydate, '?tFlag?', t1.managecom, t1.comcode, t1.operator, t1.makedate, t1.maketime, t1.modifyoperator, t1.modifydate, t1.modifytime, t1.currency, sum(t1.NetAmount), sum(t1.TaxAmount), max(t1.Tax) " +
" t1.payintv, t1.paydate, '?tFlag?', t1.managecom, t1.comcode, t1.operator, t1.makedate, t1.maketime, t1.modifyoperator, t1.modifydate, t1.modifytime, t1.currency, sum(t1.NetAmount), sum(t1.TaxAmount), max(t1.Tax) " +
" from ljspayperson t1 where t1.grpcontno='?tGrpContNo?' group by t1.getnoticeno, t1.paycount, t1.grpcontno, t1.grppolno, t1.paytype, t1.riskcode, t1.appntno, t1.endorsementno, " +
" from ljspayperson t1 where t1.grpcontno='?tGrpContNo?' group by t1.getnoticeno, t1.paycount, t1.grpcontno, t1.grppolno, t1.paytype, t1.riskcode, t1.appntno, t1.endorsementno, " +
" t1.payintv, t1.paydate, t1.managecom, t1.comcode,t1.operator, t1.makedate, t1.maketime, t1.modifyoperator, t1.modifydate, t1.modifytime,t1.currency " )
" t1.payintv, t1.paydate, t1.managecom, t1.comcode,t1.operator, t1.makedate, t1.maketime, t1.modifyoperator, t1.modifydate, t1.modifytime,t1.currency " )
@ -297,8 +304,8 @@ public interface LCGrpUWDealBLSQL {
" balancerelano, sendrelano, currency, managecom, comcode, operator, makedate, maketime, modifyoperator, modifydate, modifytime, NetAmount, TaxAmount, Tax,ISMixedPay)" +
" balancerelano, sendrelano, currency, managecom, comcode, operator, makedate, maketime, modifyoperator, modifydate, modifytime, NetAmount, TaxAmount, Tax,ISMixedPay)" +
" select t1.getnoticeno, '?tGrpContNo?',t1.paycount,t1.paytype,(case t1.paycount when 1 then '?mGrpPropNo?' else '?tGrpContNo?' end), " +
" select t1.getnoticeno, '?tGrpContNo?',t1.paycount,t1.paytype,(case t1.paycount when 1 then '?mGrpPropNo?' else '?tGrpContNo?' end), " +
" t1.appntno, sum(t1.sumduepaymoney),'?text0?', '?tPayMode?','?tPayObj?', t1.payintv, t1.paydate,null,null," +
" t1.appntno, sum(t1.sumduepaymoney),'?text0?', '?tPayMode?','?tPayObj?', t1.payintv, t1.paydate,null,null," +
" '?tBankCode?', '?tBankAccNo?', '?tAccName?', '', '' , '?tGuaranteeFlag?', '?tMasterCom?', '?text0?', '?text0?', '?text0?', '', (case paycount when 1 then 0 else -1 end), '?text0?','','' ," +
" '?tBankCode?', '?tBankAccNo?', '?tAccName?', null, null , '?tGuaranteeFlag?', '?tMasterCom?', '?text0?', '?text0?', '?text0?', null, (case paycount when 1 then 0 else -1 end), '?text0?',null,null ," +
" '' , '?text01?', t1.managecom, t1.comcode, t1.operator, t1.makedate, t1.maketime, t1.modifyoperator, t1.modifydate, t1.modifytime, sum(t1.NetAmount), sum(t1.TaxAmount), max(t1.Tax),t1.ISMixedPay " +
" null , '?text01?', t1.managecom, t1.comcode, t1.operator, t1.makedate, t1.maketime, t1.modifyoperator, t1.modifydate, t1.modifytime, sum(t1.NetAmount), sum(t1.TaxAmount), max(t1.Tax),t1.ISMixedPay " +
" from ljspayperson t1 where t1.grpcontno='?tGrpContNo?' group by t1.getnoticeno, t1.grpcontno, t1.paycount,t1.paytype, " +
" from ljspayperson t1 where t1.grpcontno='?tGrpContNo?' group by t1.getnoticeno, t1.grpcontno, t1.paycount,t1.paytype, " +
" t1.appntno, t1.payintv, t1.paydate, t1.managecom, t1.comcode,t1.operator, t1.makedate, t1.maketime, t1.modifyoperator, t1.modifydate, t1.modifytime, t1.ISMixedPay " )
" t1.appntno, t1.payintv, t1.paydate, t1.managecom, t1.comcode,t1.operator, t1.makedate, t1.maketime, t1.modifyoperator, t1.modifydate, t1.modifytime, t1.ISMixedPay " )
SQLwithBindVariables insertLJSPayByLJSPayPerson_GrpContNoGroupByGetNoTiceNoAndGrpContNoAndMore ( @Param ( "tGrpContNo" ) String tGrpContNo ,
SQLwithBindVariables insertLJSPayByLJSPayPerson_GrpContNoGroupByGetNoTiceNoAndGrpContNoAndMore ( @Param ( "tGrpContNo" ) String tGrpContNo ,
@ -314,7 +321,7 @@ public interface LCGrpUWDealBLSQL {
@Param ( "text01" ) String text01 ) ;
@Param ( "text01" ) String text01 ) ;
@SQL ( value = "insert into ljsget(getnoticeno, grpcontno, othernotype, otherno, getobj, getmode, PayMode,appntno, sumgetmoney, GetDate, guaranteeflag, insurancecom, bankonthewayflag, banksuccflag, sendbankcount, " +
@SQL ( value = "insert into ljsget(getnoticeno, grpcontno, othernotype, otherno, getobj, getmode, PayMode,appntno, sumgetmoney, GetDate, guaranteeflag, insurancecom, bankonthewayflag, banksuccflag, sendbankcount, " +
" state, balanceontime, currency, managecom, comcode, operator, makedate, maketime, modifyoperator, modifydate, modifytime) select a.getnoticeno,a.grpcontno,a.othernotype,a.otherno,'?text1?','','' ," +
" state, balanceontime, currency, managecom, comcode, operator, makedate, maketime, modifyoperator, modifydate, modifytime) select a.getnoticeno,a.grpcontno,a.othernotype,a.otherno,'?text1?',null,null ," +
" a.appntno,a.sumduepaymoney*b.premsharerate,a.paydate,'?text2?',b.coincomcode,a.bankonthewayflag,a.banksuccflag,a.sendbankcount,a.state,a.balanceontime,'?text3?'," +
" a.appntno,a.sumduepaymoney*b.premsharerate,a.paydate,'?text2?',b.coincomcode,a.bankonthewayflag,a.banksuccflag,a.sendbankcount,a.state,a.balanceontime,'?text3?'," +
" a.managecom,a.comcode,a.operator,a.makedate,a.maketime,a.modifyoperator,a.modifydate,a.modifytime " +
" a.managecom,a.comcode,a.operator,a.makedate,a.maketime,a.modifyoperator,a.modifydate,a.modifytime " +
" from ljspay a,lccoinsurance b,lcproposaltocont c where a.grpcontno=c.grpcontno and b.grpcontno=c.otherno and b.masterslaveflag='?tMasterSlaveFlag?' and a.grpcontno='?tGrpContNo?'" )
" from ljspay a,lccoinsurance b,lcproposaltocont c where a.grpcontno=c.grpcontno and b.grpcontno=c.otherno and b.masterslaveflag='?tMasterSlaveFlag?' and a.grpcontno='?tGrpContNo?'" )
@ -349,13 +356,12 @@ public interface LCGrpUWDealBLSQL {
String DonateContflagByPrtno ( @Param ( "prtno" ) String prtno ) ;
String DonateContflagByPrtno ( @Param ( "prtno" ) String prtno ) ;
@SQL ( value = "insert into ljspayperson (getnoticeno, paycount, grpcontno, grppolno, contno, polno, payaimclass, dutycode,payplancode, paytype, riskcode, appntno, endorsementno, sumduepaymoney, payintv, paydate, getflag, managecom, comcode," +
@SQL ( value = "insert into ljspayperson (getnoticeno, paycount, grpcontno, grppolno, contno, polno, payaimclass, dutycode,payplancode, paytype, riskcode, appntno, endorsementno, sumduepaymoney, payintv, paydate, getflag, managecom, comcode," +
" operator, makedate, maketime, modifyoperator, modifydate, modifytime,Currency,NetAmount,TaxAmount,Tax,ISMixedPay) select '?tGetNoticeNo?','?ti?','?tGrpContNo?',t2.grppolno,t1.contno,t1.polno,'?text2?',t1.dutycode,t3.payplancode,'?tOtherNoType?',t2.riskcode,'?tAppntNo?','',t3.prem ," +
" operator, makedate, maketime, modifyoperator, modifydate, modifytime,Currency,NetAmount,TaxAmount,Tax,ISMixedPay) select '?tGetNoticeNo?','?ti?','?tGrpContNo?',t2.grppolno,t1.contno,t1.polno,'?text2?',t1.dutycode,t3.payplancode,'?tOtherNoType?',t2.riskcode,'?tAppntNo?',null,t4.PersonBurden ," +
" to_number('?tNumPayIntv?' ),'?payDate?','?text0?','?tManageCom?','?tComCode?','?mOperator?',to_date('?mCurrentDate?','yyyy-MM-dd'),'?mCurrentTime?','?mOperator?',to_date('?mCurrentDate?','yyyy-MM-dd '),'?mCurrentTime?' , t2.currency, " +
" cast(?tNumPayIntv? as integer ),'?payDate?','?text0?','?tManageCom?','?tComCode?','?mOperator?',to_date('?mCurrentDate?','YYYY-MM-DD'),'?mCurrentTime?','?mOperator?',to_date('?mCurrentDate?','YYYY-MM-DD '),'?mCurrentTime?' , t2.currency, " +
" func_cal_vttovat((t3.prem) ,'?tOtherNoType?',t2.riskcode,'?tManageCom?',t2.currency,'?text1?','?text1?')," +
" func_cal_vttovat(t4.PersonBurden ,'?tOtherNoType?',t2.riskcode,'?tManageCom?',t2.currency,'?text1?','?text1?')," +
" func_cal_vttovat((t3.prem) ,'?tOtherNoType?',t2.riskcode,'?tManageCom?',t2.currency,'?text2?','?text1?')," +
" func_cal_vttovat(t4.PersonBurden ,'?tOtherNoType?',t2.riskcode,'?tManageCom?',t2.currency,'?text2?','?text1?')," +
" func_cal_vttovat((t3.prem) ,'?tOtherNoType?',t2.riskcode,'?tManageCom?',t2.currency,'?text3?','?text1?'),'?mISMixedPay?' " +
" func_cal_vttovat(t4.PersonBurden ,'?tOtherNoType?',t2.riskcode,'?tManageCom?',t2.currency,'?text3?','?text1?'),'?mISMixedPay?' " +
" from lcduty t1,lcpol t2,lcprem t3,lccontplandetail t4 where t1.polno = t2.polno and t1.dutycode=t3.dutycode and t2.polstate<>'?tPolState?' and t1.polno=t3.polno and t1.contno=t3.contno and t4.PolicyNo =t2.GrpContNo and t4.SysPlanCode =t2.ContPlanCode and t4.DutyCode =t3.DutyCode " +
" from lcduty t1,lcpol t2,lcprem t3,lccontplandetail t4 where t1.polno = t2.polno and t1.dutycode=t3.dutycode and t2.polstate<>'?tPolState?' and t1.polno=t3.polno and t1.contno=t3.contno and t4.PolicyNo =t2.GrpContNo and t4.SysPlanCode =t2.ContPlanCode and t4.DutyCode =t3.DutyCode " +
//去除赠险数据
" and (t4.FreeRisk is null or t4.FreeRisk =0) " +
" and (t4.FreeRisk is null or t4.FreeRisk =0) " +
" and t2.contno ='?mContNo?'" )
" and t2.contno ='?mContNo?'" )
SQLwithBindVariables insertLJSPayPersonByLCDuty_LCPol_LCPremAndPolStateNotGrpContNoAndMore5 ( @Param ( "text0" ) String text0 ,
SQLwithBindVariables insertLJSPayPersonByLCDuty_LCPol_LCPremAndPolStateNotGrpContNoAndMore5 ( @Param ( "text0" ) String text0 ,