<기능개선>

통합테스트목록 . 623
엑셀다운로드 열추가
This commit is contained in:
kdh0120 2021-12-08 23:55:22 +00:00
parent e1532e5161
commit d15003092a
3 changed files with 98 additions and 85 deletions

View File

@ -831,8 +831,8 @@ namespace NP.BO.Controllers
payItem.cmistudyplacename = vm.ComCodes.Where(w => w.cgroup.ToString() == "studyplace" && w.ccode == payItem.cmistudyplace).FirstOrDefault()?.cname; payItem.cmistudyplacename = vm.ComCodes.Where(w => w.cgroup.ToString() == "studyplace" && w.ccode == payItem.cmistudyplace).FirstOrDefault()?.cname;
} }
return ExportExcel( return ExportExcel(
new String[] { "결제번호", "신청자이름", "ID", "핸드폰", "회사명", "상품유형", "환급여부", "상품명", "결제금액", "결제방법", "입금금액", "환불금액", "신청일", "입금일", "결제상태", "환급은행명", "환급계좌번호", "환급예금주", "교육장소", "강좌교육시작일", "강좌교육종료일", "신청교육장소", "교육종료일","등급","목적","수료여부" }, new String[] { "결제번호", "신청자이름", "ID","주민번호", "핸드폰", "회사명", "상품유형", "환급여부", "상품명", "결제금액", "결제방법", "입금금액", "환불금액", "신청일","신청일시", "입금일", "결제상태", "환급은행명", "환급계좌번호", "환급예금주", "교육장소", "강좌교육시작일", "강좌교육종료일", "신청교육장소", "교육종료일","기술인분류","교육구분","직무분야","등급","목적","수료여부" },
new String[] { "payno", "username", "userid", "mobile", "asname", "cshapename", "isrebatename", "itemname", "payamt", "pptypename", "payamt", "refundamt", "cdtymd", "payymd", "pstatusname2", "rbank", "rbankaccnum", "tbankuser", "studyplacename", "sdateymd", "edateymd", "cmistudyplacename", "cmiestartymd","tgname","tename", "completename" }, new String[] { "payno", "username", "userid"," userpno", "mobile", "asname", "cshapename", "isrebatename", "itemname", "payamt", "pptypename", "payamt", "refundamt", "cdtymd","cdtymdhms", "payymd", "pstatusname2", "rbank", "rbankaccnum", "tbankuser", "studyplacename", "sdateymd", "edateymd", "cmistudyplacename", "cmiestartymd","tmname","edukind","tjname","tgname","tename", "completename" },
vm.PayItems, vm.PayItems,
"ProductSales_" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day); "ProductSales_" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day);
} }

View File

@ -796,93 +796,95 @@
<select id="cr.payitems" parameterClass="hashtable" resultClass="payitem"> <select id="cr.payitems" parameterClass="hashtable" resultClass="payitem">
select a.* select a.*
from ( from (
select a.isexamready,a.ccount select a.isexamready,a.ccount
,case when a.isexamready=1 then ue.exno else p.payno end payno ,case when a.isexamready=1 then ue.exno else p.payno end payno
,case when a.isexamready=1 then 0 else p.ptype end pptype,p.payoktime,p.isgroup ,case when a.isexamready=1 then 0 else p.ptype end pptype,p.payoktime,p.isgroup
,case when a.isexamready=1 then case when ua.isjoin=1 then uee.infee else uee.outfee end else p.payamt end payamt,p.refundamt,p.rstatus ,case when a.isexamready=1 then case when ua.isjoin=1 then uee.infee else uee.outfee end else p.payamt end payamt,p.refundamt,p.rstatus
,case when a.isexamready=1 then 21 else p.pstatus end pstatus ,case when a.isexamready=1 then 21 else p.pstatus end pstatus
,case when a.isexamready=1 then ue.cdt else case pi.ptype when 3 then exu.cdt when 4 then le.oktime else p.cdt end end cdt ,case when a.isexamready=1 then ue.cdt else case pi.ptype when 3 then exu.cdt when 4 then le.oktime else p.cdt end end cdt
,case when a.isexamready=1 then ue.exno else pi.pino end pino,pi.isrebate ,case when a.isexamready=1 then ue.exno else pi.pino end pino,pi.isrebate
,case when a.isexamready=1 then 3 else pi.ptype end ptype ,case when a.isexamready=1 then 3 else pi.ptype end ptype
,case when a.isexamready=1 then 0 else p.isunpay end isunpay ,case when a.isexamready=1 then 0 else p.isunpay end isunpay
,case when p.rstatus=0 and pr.rstatus = 0 and pri.rfdno is not null then 1 else 0 end isrefundcall ,case when p.rstatus=0 and pr.rstatus = 0 and pri.rfdno is not null then 1 else 0 end isrefundcall
,u.userno,u.userid,u.username ,u.userno,u.userid,u.username
,cast(AES_DECRYPT(UNHEX(u.mobile), 'np123@!' ) as char) as mobile ,concat(substring(CAST(AES_DECRYPT(UNHEX(u.userpno),<include refid="sql.digest"></include>) as char),1,6),'-',substring(CAST(AES_DECRYPT(UNHEX(u.userpno),<include refid="sql.digest"></include>) as char),7,7)) userpno
,ua.asname,ua.isjoin ,cast(AES_DECRYPT(UNHEX(u.mobile), 'np123@!' ) as char) as mobile
,cm.cshape,cm.sstime,cm.setime,cm.studyplace ,ua.asname,ua.isjoin
,le.sdate,le.edate,le.iscomplete,le.attrate ,cm.cshape,cm.sstime,cm.setime,cm.studyplace
,case when a.isexamready=1 then uee.exname else case pi.ptype when 2 then bk.bkname when 3 then ex.exname else cm.cname end end itemname ,le.sdate,le.edate,le.iscomplete,le.attrate
,ppl.rbankname,CAST(AES_DECRYPT(UNHEX(ppl.rbankacc), <include refid="sql.digest"></include>) AS char) rbankacc,ppl.rbankowner ,case when a.isexamready=1 then uee.exname else case pi.ptype when 2 then bk.bkname when 3 then ex.exname else cm.cname end end itemname
,ppl.rbankname,CAST(AES_DECRYPT(UNHEX(ppl.rbankacc), <include refid="sql.digest"></include>) AS char) rbankacc,ppl.rbankowner
,row_number() over(order by case when pr.rstatus=0 and pri.rfdno is not null then 0 else 1 end, case when a.isexamready=1 then ue.cdt else p.cdt end desc) rno ,row_number() over(order by case when pr.rstatus=0 and pri.rfdno is not null then 0 else 1 end, case when a.isexamready=1 then ue.cdt else p.cdt end desc) rno
,count(p.payno) over() pagetotalcount ,count(p.payno) over() pagetotalcount
,scd.estart cmiestart, scd.eend cmieeend, scd.studyplace cmistudyplace ,scd.estart cmiestart, scd.eend cmieeend, scd.studyplace cmistudyplace
,pi.rbank , CAST(AES_DECRYPT(UNHEX(pi.rbankaccnum), <include refid="sql.digest"></include>) AS char) rbankaccnum, pi.tbankuser ,pi.rbank , CAST(AES_DECRYPT(UNHEX(pi.rbankaccnum), <include refid="sql.digest"></include>) AS char) rbankaccnum, pi.tbankuser
,cc1.cname tgname,cc2.cname tename ,cc1.cname tgname,cc2.cname tename
from ( ,cc3.cname tmname,cc4.cname tjname
select 0 isexamready,p.payno,max(case when pi.ptype in (0,1,3,4) then pi.pino else 0 end) pi1,min(pi.pino) pi2,count(pi.pino) ccount from (
from pay p select 0 isexamready,p.payno,max(case when pi.ptype in (0,1,3,4) then pi.pino else 0 end) pi1,min(pi.pino) pi2,count(pi.pino) ccount
inner join payitem pi on pi.payno=p.payno from pay p
<isNotNull property="piptype">and pi.ptype=#piptype#</isNotNull> inner join payitem pi on pi.payno=p.payno
<isNotNull property="isrebates">and pi.ptype in (0, 4) and pi.isrebate in ($isrebates$)</isNotNull> <isNotNull property="piptype">and pi.ptype=#piptype#</isNotNull>
inner join users u on u.userno=p.userno <isNotNull property="isrebates">and pi.ptype in (0, 4) and pi.isrebate in ($isrebates$)</isNotNull>
left outer join assign ua on ua.asno=u.asno inner join users u on u.userno=p.userno
left outer join payrfditem pri on pri.pino=pi.pino left outer join assign ua on ua.asno=u.asno
left outer join payrfd pr on pr.rfdno=pri.rfdno left outer join payrfditem pri on pri.pino=pi.pino
left outer join cm cm on pi.ptype in (0,1,4) and cm.cmno=pi.itemno left outer join payrfd pr on pr.rfdno=pri.rfdno
left outer join cm cm2 on cm2.cmno=cm.pcmno left outer join cm cm on pi.ptype in (0,1,4) and cm.cmno=pi.itemno
left outer join cg cg on cg.cgno=cm.cgno left outer join cm cm2 on cm2.cmno=cm.pcmno
left outer join book bk on pi.ptype=2 and bk.bkno=pi.itemno left outer join cg cg on cg.cgno=cm.cgno
left outer join exam ex on pi.ptype=3 and ex.exno=pi.itemno left outer join book bk on pi.ptype=2 and bk.bkno=pi.itemno
where p.pstatus in (1,21,22,41,42,43) left outer join exam ex on pi.ptype=3 and ex.exno=pi.itemno
<isNotNull property="cdts">and p.cdt &gt;= #cdts#</isNotNull> where p.pstatus in (1,21,22,41,42,43)
<isNotNull property="cdte">and p.cdt &lt;= #cdte#</isNotNull> <isNotNull property="cdts">and p.cdt &gt;= #cdts#</isNotNull>
<isNotNull property="cdte">and p.cdt &lt;= #cdte#</isNotNull>
<!--<isNotNull property="pstatusin">and p.pstatus in ($pstatusin$)</isNotNull>-->
<!--<isNotNull property="isrefundcall">and (p.rstatus =0 and pr.rstatus=0 and pri.rfdno is not null)</isNotNull>--> <!--<isNotNull property="pstatusin">and p.pstatus in ($pstatusin$)</isNotNull>-->
<!--<isNotNull property="rstatusin">and pi.rstatus in ($rstatusin$)</isNotNull>--> <!--<isNotNull property="isrefundcall">and (p.rstatus =0 and pr.rstatus=0 and pri.rfdno is not null)</isNotNull>-->
<isNotNull property="pstatusall">$pstatusall$</isNotNull> <!--<isNotNull property="rstatusin">and pi.rstatus in ($rstatusin$)</isNotNull>-->
<isNotNull property="pstatusall">$pstatusall$</isNotNull>
<isNotNull property="ptypein">and p.ptype in ($ptypein$)</isNotNull>
<isNotNull property="isjoin">and ua.isjoin=#isjoin#</isNotNull> <isNotNull property="ptypein">and p.ptype in ($ptypein$)</isNotNull>
<isNotNull property="asname">and ua.asname like concat('%',#asname#,'%')</isNotNull> <isNotNull property="isjoin">and ua.isjoin=#isjoin#</isNotNull>
<isNotNull property="brno">and ua.brno=#brno#</isNotNull> <isNotNull property="asname">and ua.asname like concat('%',#asname#,'%')</isNotNull>
<isNotNull property="cshape">and cm.cshape=#cshape#</isNotNull> <isNotNull property="brno">and ua.brno=#brno#</isNotNull>
<isNotNull property="pcgno">and cg.pcgno=#pcgno#</isNotNull> <isNotNull property="cshape">and cm.cshape=#cshape#</isNotNull>
<isNotNull property="username">and u.username=#username#</isNotNull> <isNotNull property="pcgno">and cg.pcgno=#pcgno#</isNotNull>
<isNotNull property="userid">and u.userid=#userid#</isNotNull> <isNotNull property="username">and u.username=#username#</isNotNull>
<isNotNull property="itemname">and (cm.cname like concat('%',#itemname#,'%') or bk.bkname like concat('%',#itemname#,'%') or ex.exname like concat('%',#itemname#,'%'))</isNotNull> <isNotNull property="userid">and u.userid=#userid#</isNotNull>
<isNotNull property="cname">and (cm2.cname like concat('%',#cname#,'%'))</isNotNull> <isNotNull property="itemname">and (cm.cname like concat('%',#itemname#,'%') or bk.bkname like concat('%',#itemname#,'%') or ex.exname like concat('%',#itemname#,'%'))</isNotNull>
<isNotNull property="usernameiditemname">and (u.username=#usernameiditemname# or u.userid=#usernameiditemname# or cm.cname like concat('%',#usernameiditemname#,'%') or bk.bkname like concat('%',#usernameiditemname#,'%') or ex.exname like concat('%',#usernameiditemname#,'%') or cm2.cname like concat('%',#usernameiditemname#,'%') or ua.asname like concat('%',#usernameiditemname#,'%'))</isNotNull> <isNotNull property="cname">and (cm2.cname like concat('%',#cname#,'%'))</isNotNull>
<isNotNull property="isgroup">and p.isgroup=1</isNotNull> <isNotNull property="usernameiditemname">and (u.username=#usernameiditemname# or u.userid=#usernameiditemname# or cm.cname like concat('%',#usernameiditemname#,'%') or bk.bkname like concat('%',#usernameiditemname#,'%') or ex.exname like concat('%',#usernameiditemname#,'%') or cm2.cname like concat('%',#usernameiditemname#,'%') or ua.asname like concat('%',#usernameiditemname#,'%'))</isNotNull>
<isNotNull property="isunpay">and p.isunpay=#isunpay#</isNotNull> <isNotNull property="isgroup">and p.isgroup=1</isNotNull>
<isNotNull property="payno">and p.payno=#payno#</isNotNull> <isNotNull property="isunpay">and p.isunpay=#isunpay#</isNotNull>
<isNotNull property="mobile" prepend="and">cast(AES_DECRYPT(UNHEX(u.mobile), 'np123@!' ) as char) like concat('%',#mobile#,'%')</isNotNull> <isNotNull property="payno">and p.payno=#payno#</isNotNull>
group by p.payno <isNotNull property="mobile" prepend="and">cast(AES_DECRYPT(UNHEX(u.mobile), 'np123@!' ) as char) like concat('%',#mobile#,'%')</isNotNull>
union all group by p.payno
select 1 isexamready,a.exno payno,a.userno pi1,a.userno pi2,1 ccount union all
from examuser a select 1 isexamready,a.exno payno,a.userno pi1,a.userno pi2,1 ccount
inner join exam ex on ex.exno=a.exno <isNotNull property="itemname">and ex.exname like concat('%',#itemname#,'%')</isNotNull> from examuser a
inner join users u on u.userno=a.userno inner join exam ex on ex.exno=a.exno <isNotNull property="itemname">and ex.exname like concat('%',#itemname#,'%')</isNotNull>
left outer join assign ua on ua.asno=u.asno inner join users u on u.userno=a.userno
where a.status=1 and a.payno is null and a.pino is null and a.pstatus=4 left outer join assign ua on ua.asno=u.asno
<isNotNull property="piptype">and #piptype#=3</isNotNull> where a.status=1 and a.payno is null and a.pino is null and a.pstatus=4
<isNotNull property="isrebates">and a.exno=0</isNotNull> <isNotNull property="piptype">and #piptype#=3</isNotNull>
<isNotNull property="rstatusin">and a.exno=0</isNotNull> <isNotNull property="isrebates">and a.exno=0</isNotNull>
<isNotNull property="cdts">and a.cdt &gt;= #cdts#</isNotNull> <isNotNull property="rstatusin">and a.exno=0</isNotNull>
<isNotNull property="cdte">and a.cdt &lt;= #cdte#</isNotNull> <isNotNull property="cdts">and a.cdt &gt;= #cdts#</isNotNull>
<isNotNull property="pstatusin">and concat(',',#pstatusin#,',') like '%,21,%'</isNotNull> <isNotNull property="cdte">and a.cdt &lt;= #cdte#</isNotNull>
<isNotNull property="isrefundcall">and a.exno=0</isNotNull> <isNotNull property="pstatusin">and concat(',',#pstatusin#,',') like '%,21,%'</isNotNull>
<isNotNull property="ptypein">and a.exno=0</isNotNull> <isNotNull property="isrefundcall">and a.exno=0</isNotNull>
<isNotNull property="isjoin">and ua.isjoin=#isjoin#</isNotNull> <isNotNull property="ptypein">and a.exno=0</isNotNull>
<isNotNull property="asname">and ua.asname like concat('%',#asname#,'%')</isNotNull> <isNotNull property="isjoin">and ua.isjoin=#isjoin#</isNotNull>
<isNotNull property="brno">and ua.brno=#brno#</isNotNull> <isNotNull property="asname">and ua.asname like concat('%',#asname#,'%')</isNotNull>
<isNotNull property="cshape">and a.exno=0</isNotNull> <isNotNull property="brno">and ua.brno=#brno#</isNotNull>
<isNotNull property="pcgno">and a.exno=0</isNotNull> <isNotNull property="cshape">and a.exno=0</isNotNull>
<isNotNull property="username">and u.username=#username#</isNotNull> <isNotNull property="pcgno">and a.exno=0</isNotNull>
<isNotNull property="userid">and u.userid=#userid#</isNotNull> <isNotNull property="username">and u.username=#username#</isNotNull>
<isNotNull property="usernameiditemname">and (u.username=#usernameiditemname# or u.userid=#usernameiditemname# or ex.exname like concat('%',#usernameiditemname#,'%') or ua.asname like concat('%',#usernameiditemname#,'%'))</isNotNull> <isNotNull property="userid">and u.userid=#userid#</isNotNull>
<isNotNull property="isgroup">and a.exno=0</isNotNull> <isNotNull property="usernameiditemname">and (u.username=#usernameiditemname# or u.userid=#usernameiditemname# or ex.exname like concat('%',#usernameiditemname#,'%') or ua.asname like concat('%',#usernameiditemname#,'%'))</isNotNull>
<isNotNull property="mobile" prepend="and">cast(AES_DECRYPT(UNHEX(u.mobile), 'np123@!' ) as char) like concat('%',#mobile#,'%')</isNotNull> <isNotNull property="isgroup">and a.exno=0</isNotNull>
<isNotNull property="mobile" prepend="and">cast(AES_DECRYPT(UNHEX(u.mobile), 'np123@!' ) as char) like concat('%',#mobile#,'%')</isNotNull>
) a ) a
left outer join pay p on a.isexamready=0 and p.payno=a.payno left outer join pay p on a.isexamready=0 and p.payno=a.payno
left outer join payitem pi on a.isexamready=0 and pi.pino=case when a.pi1=0 then a.pi2 else a.pi1 end left outer join payitem pi on a.isexamready=0 and pi.pino=case when a.pi1=0 then a.pi2 else a.pi1 end
@ -901,6 +903,8 @@
left outer join cminningscd scd on scd.cmisno = le.cmisno left outer join cminningscd scd on scd.cmisno = le.cmisno
left outer join comcode cc1 on cc1.ccode = ppl.typegrade left outer join comcode cc1 on cc1.ccode = ppl.typegrade
left outer join comcode cc2 on cc2.ccode = ppl.typeedu left outer join comcode cc2 on cc2.ccode = ppl.typeedu
left outer join comcode cc3 on cc3.ccode = ppl.typeman
left outer join comcode cc4 on cc4.ccode = ppl.typejob
<dynamic prepend="where"> <dynamic prepend="where">
<isNotNull property="estart" prepend="and">scd.estart &gt;= #estart#</isNotNull> <isNotNull property="estart" prepend="and">scd.estart &gt;= #estart#</isNotNull>
<isNotNull property="eend" prepend="and">scd.eend &lt;= #eend#</isNotNull> <isNotNull property="eend" prepend="and">scd.eend &lt;= #eend#</isNotNull>

View File

@ -593,8 +593,17 @@ namespace NP.Model
/// </summary> /// </summary>
public int studydays { get; set; } public int studydays { get; set; }
public DateTime? estart { get; set; } public DateTime? estart { get; set; }
public String tmname { get; set; }
public String tjname { get; set; }
public String tgname { get; set; } public String tgname { get; set; }
public String tename { get; set; } public String tename { get; set; }
public String edukind
{
get
{
return tename == null ? "" : tename.Contains("기본교육") ? "기본" : "전문";
}
}
/// <summary> /// <summary>
/// 수료여부 /// 수료여부
/// </summary> /// </summary>
@ -606,7 +615,7 @@ namespace NP.Model
} }
} }
public int attrate { get; set; } public int attrate { get; set; }
public String userpno { get; set; }
} }
/// <summary> /// <summary>