"(case when exists( select 1 from LLEleBillLockEntryInfo where lockstatus = '1' and clmno = a.rgtno and LockDate is not null) then concat ((select datediff(CURRENT_DATE,LockDate) + 1 from "+
"(case when exists( select 1 from LLEleBillLockEntryInfo where lockstatus = '1' and clmno = a.rgtno and LockDate is not null) then concat ((select CURRENT_DATE - LockDate + 1 from "+
"(select (case when LockDate is not null then LockDate else (select CURRENT_DATE from dual) end) LockDate,clmno from LLEleBillLockEntryInfo"+
" where lockstatus = '1' order by LockDate asc) where clmno = a.rgtno limit 1),' 天') else '' end) LockDate from llregister a,lwmission b where a.rgtno = b.MissionProp1 and a.AcceptConclusion = '1' and b.ActivityID = '1800501003' and (b.DefaultOperator is null or b.DefaultOperator = '') @{0} @{1} @{2} @{3} @{4} @{5} @{6} order by cc desc,dd desc,LockDate desc",clauses={
@SQL(value="select a.RgtObjNo,a.RgtNo,a.CustomerNo,a.CustomerName,a.CustomerIDNo,a.MngCom,a.RgtSources as 案件来源,datediff(now(),a.ApplyDate) as cc,datediff(now(),(select AcceptConfDate from llgrpregister c where c.RgtNo = a.RgtObjNo)) as dd,"+
"(case when exists( select 1 from LLEleBillLockEntryInfo where lockstatus = '1' and clmno = a.rgtno and LockDate is not null) then concat ((select datediff(CURRENT_DATE,LockDate) + 1 from "+
@SQL(value="select a.RgtObjNo,a.RgtNo,a.CustomerNo,a.CustomerName,a.CustomerIDNo,a.MngCom,a.RgtSources as 案件来源,(now() - a.ApplyDate) as cc,(now()-(select AcceptConfDate from llgrpregister c where c.RgtNo = a.RgtObjNo)) as dd,"+
"(case when exists( select 1 from LLEleBillLockEntryInfo where lockstatus = '1' and clmno = a.rgtno and LockDate is not null) then concat ((select CURRENT_DATE - LockDate + 1 from "+
"(select (case when LockDate is not null then LockDate else (select CURRENT_DATE from dual) end) as LockDate,clmno from LLEleBillLockEntryInfo"+
" where lockstatus = '1' order by LockDate asc) as ee where clmno = a.rgtno limit 1),' 天') else '' end) as LockDate from llregister a,lwmission b where a.rgtno = b.MissionProp1 and a.AcceptConclusion = '1' and b.ActivityID = '1800501003' and (b.DefaultOperator is not null or b.DefaultOperator <> '') @{0} @{1} order by cc desc,dd desc,LockDate desc",clauses={
@SQL(value="select b.RgtObjNo,b.RgtNo,datediff(now(),(select c.RptDate from llreport c where c.RptNo = b.RptNo))+1,"+
@SQL(value="select b.RgtObjNo,b.RgtNo,now()-(select c.RptDate from llreport c where c.RptNo = b.RptNo)+1,"+
" (case (select distinct 1 from llinqapply where ClmNo = b.rgtno and InqFlowState not in ('06','07')) when 1 then \n"+
" case (select distinct 1 from llclaimseconduw c where c.RgtNo = b.rgtno and State = '0') when 1 then '审核-调查-二核' else '审核-调查' end\n"+
" else\n"+
@ -43,7 +43,7 @@ public interface LLClaimCaseReviewAppSql {
"Customername,(select m.codename from ldcode m where m.code=b.customersex and m.codetype='sex'),b.RgtDate,(select codename from ldcode where CodeType = 'reviewComWhere' and code = missionprop12),b.RgtSources 案件来源,a.makedate 进入日期,b.Operator,b.MngCom,"+
//"datediff(now(),b.RgtConfDate)+1 aa," +
//经薛磊提出,计算经过天数改为当前时间减去材料齐全时间
"datediff(now(), b.AccidentDate) + 1 aa,\n"+
"now()- b.AccidentDate + 1 aa,\n"+
"(case when exists (select 1 from LLEleBillLockEntryInfo c where c.lockstatus = '1' and c.clmno = b.rgtno order by LockDate asc) "+
"then concat((datediff(now(),(select min(LockDate) from LLEleBillLockEntryInfo c where c.lockstatus = '1' and c.clmno = b.rgtno order by LockDate asc)) + 1),'天') else '' end) lockTime,'' 权限,'' 预付标志 "+
"from lwmission a,llregister b where 1=1 and a.missionprop1 = b.rgtno and a.activityid='1800501005' and (a.defaultoperator is null or a.DefaultOperator = '') @{0} @{1} @{2} @{3} @{4} @{5} @{6} @{7} order by aa desc,lockTime desc",clauses={
@ -59,7 +59,7 @@ public interface LLClaimCaseReviewAppSql {
@SQL(value="select b.RgtObjNo,b.RgtNo,datediff(now(),(select c.RptDate from llreport c where c.RptNo = b.RptNo))+1,"+
@SQL(value="select b.RgtObjNo,b.RgtNo,now() - (select c.RptDate from llreport c where c.RptNo = b.RptNo)+1,"+
" (case (select distinct 1 from llinqapply where ClmNo = b.rgtno and InqFlowState not in ('06','07')) when 1 then \n"+
" case (select distinct 1 from llclaimseconduw c where c.RgtNo = b.rgtno and State = '0') when 1 then '审核-调查-二核' else '审核-调查' end\n"+
" else\n"+
@ -69,9 +69,9 @@ public interface LLClaimCaseReviewAppSql {
"Customername,(select m.codename from ldcode m where m.code=b.customersex and m.codetype='sex'),b.RgtDate,(select codename from ldcode where CodeType = 'reviewComWhere' and code = missionprop12),b.RgtSources 案件来源,a.makedate 进入日期,b.Operator,b.MngCom,"+
//"datediff(now(),b.RgtConfDate)+1 aa," +
//经薛磊提出,计算经过天数改为当前时间减去材料齐全时间
"datediff(now(), b.AccidentDate) + 1 aa,\n"+
"now() - b.AccidentDate + 1 aa,\n"+
"(case when exists (select 1 from LLEleBillLockEntryInfo c where c.lockstatus = '1' and c.clmno = b.rgtno order by LockDate asc) "+
"then concat((datediff(now(),(select min(LockDate) from LLEleBillLockEntryInfo c where c.lockstatus = '1' and c.clmno = b.rgtno order by LockDate asc)) + 1),'天') else '' end) lockTime,'' 权限,'' 预付标志 "+
"then concat(((now() - (select min(LockDate) from LLEleBillLockEntryInfo c where c.lockstatus = '1' and c.clmno = b.rgtno order by LockDate asc)) + 1),'天') else '' end) lockTime,'' 权限,'' 预付标志 "+
"from lwmission a,llregister b where 1=1 and a.missionprop1 = b.rgtno and a.activityid='1800501005' @{0} @{1} order by aa desc,lockTime desc",clauses={