@ -347,7 +347,7 @@ public interface LCGrpPrintBLSQL {
@SQL(value="select polno,(select riskname from lmriskapp where RiskCode=a.RiskCode),InsuYear,InsuYearFlag,Amnt,Prem,BonusGetMode, ifnull((select P6 from lcdutysub lds where lds.BussType ='NB' and lds.BussNo =a.GrpContNo and lds.PolNo =a.PolNo limit 1) ,'---'), ifnull((select concat(P2*100,'%') from lcdutysub lds where lds.BussType ='NB' and lds.BussNo =a.GrpContNo and lds.PolNo =a.PolNo limit 1) ,'---'), Amnt , (select min(getstartdate) From lcget B1 where polno = a.polno and exists(select 'X' From lmdutyget b where getdutycode = b1.getdutycode and Type='0')),(select sum(money) from lcinsureacctrace c where contno= a.contno and exists(select 'X' from lmdutypay where payplancode = c.payplancode AND payplanname LIKE '%未归属%')),(select sum(money) from lcinsureacctrace c where contno= a.contno and exists(select 'X' from lmdutypay where payplancode = c.payplancode AND payplanname LIKE '%已归属%')),(select sum(money) from lcinsureacctrace c where contno= a.contno and exists(select 'X' from lmdutypay where payplancode = c.payplancode AND payplanname LIKE '%个人%')),(select dutyname from lmduty c where dutycode in (select dutycode from lcduty where polno=a.polno) limit 1),(select (select trim(codename) from ldcode where codetype='getintv' and code=c.getintv) from lcget c where polno=a.polno limit 1),(select to_char(getstartdate,'mm-dd') from lcget c where polno=a.polno limit 1) from lcpol a where contno='?ContNo?' order by (select subriskflag from lmriskapp where riskcode=a.riskcode) ")
@SQL(value="select riskcode,InsuYear,InsuYearFlag,(select CODENAME From ldcode where codetype = 'periodunit' and code=a.InsuYearFlag) from lcpol a where contno='?ContNo?' and polno = mainpolno")
@ -387,7 +387,7 @@ public interface LCGrpPrintBLSQL {
@SQL(value="select name,(select CodeName from ldcode a where a.CodeType ='sex' and code=a.sex),birthday,(select CodeName from ldcode a where a.CodeType ='idtype' and code=a.idtype),idno,(case when exists (select 1 from LCBnf b where b.contno=a.contno and b.bnftype = '1' and b.InsuredNo=a.InsuredNo) then (select b.name from LCBnf b where b.contno=a.contno and b.bnftype = '1' and b.InsuredNo=a.InsuredNo) else '法定继承人' end ) 附属被保人受益人,(select PlanCode from lccontplan where grpcontno=a.GrpContNo and ContPlanCode=a.ContPlanCode limit 1) 保障层级 From lcinsured a where a.RelationToMainInsured !='00' and a.ContNo ='?mContNo?'")
@SQL(value="select name,(select CodeName from ldcode where CodeType ='sex' and code=a.sex),birthday,(select CodeName from ldcode where CodeType ='idtype' and code=a.idtype),idno,(case when exists (select 1 from LCBnf b where b.contno=a.contno and b.bnftype = '1' and b.InsuredNo=a.InsuredNo) then (select b.name from LCBnf b where b.contno=a.contno and b.bnftype = '1' and b.InsuredNo=a.InsuredNo) else '法定继承人' end ) 附属被保人受益人,(select PlanCode from lccontplan where grpcontno=a.GrpContNo and ContPlanCode=a.ContPlanCode limit 1) 保障层级 From lcinsured a where a.RelationToMainInsured !='00' and a.ContNo ='?mContNo?'")