<기능개선>

통합테스트목록 . 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;
}
return ExportExcel(
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[] { "결제번호", "신청자이름", "ID","주민번호", "핸드폰", "회사명", "상품유형", "환급여부", "상품명", "결제금액", "결제방법", "입금금액", "환불금액", "신청일","신청일시", "입금일", "결제상태", "환급은행명", "환급계좌번호", "환급예금주", "교육장소", "강좌교육시작일", "강좌교육종료일", "신청교육장소", "교육종료일","기술인분류","교육구분","직무분야","등급","목적","수료여부" },
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,
"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 a.*
from (
select a.isexamready,a.ccount
,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 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 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 3 else pi.ptype end ptype
,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
,u.userno,u.userid,u.username
,cast(AES_DECRYPT(UNHEX(u.mobile), 'np123@!' ) as char) as mobile
,ua.asname,ua.isjoin
,cm.cshape,cm.sstime,cm.setime,cm.studyplace
,le.sdate,le.edate,le.iscomplete,le.attrate
,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
select a.isexamready,a.ccount
,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 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 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 3 else pi.ptype end ptype
,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
,u.userno,u.userid,u.username
,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
,cast(AES_DECRYPT(UNHEX(u.mobile), 'np123@!' ) as char) as mobile
,ua.asname,ua.isjoin
,cm.cshape,cm.sstime,cm.setime,cm.studyplace
,le.sdate,le.edate,le.iscomplete,le.attrate
,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
,count(p.payno) over() pagetotalcount
,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
,cc1.cname tgname,cc2.cname tename
from (
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 pay p
inner join payitem pi on pi.payno=p.payno
<isNotNull property="piptype">and pi.ptype=#piptype#</isNotNull>
<isNotNull property="isrebates">and pi.ptype in (0, 4) and pi.isrebate in ($isrebates$)</isNotNull>
inner join users u on u.userno=p.userno
left outer join assign ua on ua.asno=u.asno
left outer join payrfditem pri on pri.pino=pi.pino
left outer join payrfd pr on pr.rfdno=pri.rfdno
left outer join cm cm on pi.ptype in (0,1,4) and cm.cmno=pi.itemno
left outer join cm cm2 on cm2.cmno=cm.pcmno
left outer join cg cg on cg.cgno=cm.cgno
left outer join book bk on pi.ptype=2 and bk.bkno=pi.itemno
left outer join exam ex on pi.ptype=3 and ex.exno=pi.itemno
where p.pstatus in (1,21,22,41,42,43)
<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="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="asname">and ua.asname like concat('%',#asname#,'%')</isNotNull>
<isNotNull property="brno">and ua.brno=#brno#</isNotNull>
<isNotNull property="cshape">and cm.cshape=#cshape#</isNotNull>
<isNotNull property="pcgno">and cg.pcgno=#pcgno#</isNotNull>
<isNotNull property="username">and u.username=#username#</isNotNull>
<isNotNull property="userid">and u.userid=#userid#</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="cname">and (cm2.cname like concat('%',#cname#,'%'))</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="isgroup">and p.isgroup=1</isNotNull>
<isNotNull property="isunpay">and p.isunpay=#isunpay#</isNotNull>
<isNotNull property="payno">and p.payno=#payno#</isNotNull>
<isNotNull property="mobile" prepend="and">cast(AES_DECRYPT(UNHEX(u.mobile), 'np123@!' ) as char) like concat('%',#mobile#,'%')</isNotNull>
group by p.payno
union all
select 1 isexamready,a.exno payno,a.userno pi1,a.userno pi2,1 ccount
from examuser a
inner join exam ex on ex.exno=a.exno <isNotNull property="itemname">and ex.exname like concat('%',#itemname#,'%')</isNotNull>
inner join users u on u.userno=a.userno
left outer join assign ua on ua.asno=u.asno
where a.status=1 and a.payno is null and a.pino is null and a.pstatus=4
<isNotNull property="piptype">and #piptype#=3</isNotNull>
<isNotNull property="isrebates">and a.exno=0</isNotNull>
<isNotNull property="rstatusin">and a.exno=0</isNotNull>
<isNotNull property="cdts">and a.cdt &gt;= #cdts#</isNotNull>
<isNotNull property="cdte">and a.cdt &lt;= #cdte#</isNotNull>
<isNotNull property="pstatusin">and concat(',',#pstatusin#,',') like '%,21,%'</isNotNull>
<isNotNull property="isrefundcall">and a.exno=0</isNotNull>
<isNotNull property="ptypein">and a.exno=0</isNotNull>
<isNotNull property="isjoin">and ua.isjoin=#isjoin#</isNotNull>
<isNotNull property="asname">and ua.asname like concat('%',#asname#,'%')</isNotNull>
<isNotNull property="brno">and ua.brno=#brno#</isNotNull>
<isNotNull property="cshape">and a.exno=0</isNotNull>
<isNotNull property="pcgno">and a.exno=0</isNotNull>
<isNotNull property="username">and u.username=#username#</isNotNull>
<isNotNull property="userid">and u.userid=#userid#</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="isgroup">and a.exno=0</isNotNull>
<isNotNull property="mobile" prepend="and">cast(AES_DECRYPT(UNHEX(u.mobile), 'np123@!' ) as char) like concat('%',#mobile#,'%')</isNotNull>
,cc3.cname tmname,cc4.cname tjname
from (
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 pay p
inner join payitem pi on pi.payno=p.payno
<isNotNull property="piptype">and pi.ptype=#piptype#</isNotNull>
<isNotNull property="isrebates">and pi.ptype in (0, 4) and pi.isrebate in ($isrebates$)</isNotNull>
inner join users u on u.userno=p.userno
left outer join assign ua on ua.asno=u.asno
left outer join payrfditem pri on pri.pino=pi.pino
left outer join payrfd pr on pr.rfdno=pri.rfdno
left outer join cm cm on pi.ptype in (0,1,4) and cm.cmno=pi.itemno
left outer join cm cm2 on cm2.cmno=cm.pcmno
left outer join cg cg on cg.cgno=cm.cgno
left outer join book bk on pi.ptype=2 and bk.bkno=pi.itemno
left outer join exam ex on pi.ptype=3 and ex.exno=pi.itemno
where p.pstatus in (1,21,22,41,42,43)
<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="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="asname">and ua.asname like concat('%',#asname#,'%')</isNotNull>
<isNotNull property="brno">and ua.brno=#brno#</isNotNull>
<isNotNull property="cshape">and cm.cshape=#cshape#</isNotNull>
<isNotNull property="pcgno">and cg.pcgno=#pcgno#</isNotNull>
<isNotNull property="username">and u.username=#username#</isNotNull>
<isNotNull property="userid">and u.userid=#userid#</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="cname">and (cm2.cname like concat('%',#cname#,'%'))</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="isgroup">and p.isgroup=1</isNotNull>
<isNotNull property="isunpay">and p.isunpay=#isunpay#</isNotNull>
<isNotNull property="payno">and p.payno=#payno#</isNotNull>
<isNotNull property="mobile" prepend="and">cast(AES_DECRYPT(UNHEX(u.mobile), 'np123@!' ) as char) like concat('%',#mobile#,'%')</isNotNull>
group by p.payno
union all
select 1 isexamready,a.exno payno,a.userno pi1,a.userno pi2,1 ccount
from examuser a
inner join exam ex on ex.exno=a.exno <isNotNull property="itemname">and ex.exname like concat('%',#itemname#,'%')</isNotNull>
inner join users u on u.userno=a.userno
left outer join assign ua on ua.asno=u.asno
where a.status=1 and a.payno is null and a.pino is null and a.pstatus=4
<isNotNull property="piptype">and #piptype#=3</isNotNull>
<isNotNull property="isrebates">and a.exno=0</isNotNull>
<isNotNull property="rstatusin">and a.exno=0</isNotNull>
<isNotNull property="cdts">and a.cdt &gt;= #cdts#</isNotNull>
<isNotNull property="cdte">and a.cdt &lt;= #cdte#</isNotNull>
<isNotNull property="pstatusin">and concat(',',#pstatusin#,',') like '%,21,%'</isNotNull>
<isNotNull property="isrefundcall">and a.exno=0</isNotNull>
<isNotNull property="ptypein">and a.exno=0</isNotNull>
<isNotNull property="isjoin">and ua.isjoin=#isjoin#</isNotNull>
<isNotNull property="asname">and ua.asname like concat('%',#asname#,'%')</isNotNull>
<isNotNull property="brno">and ua.brno=#brno#</isNotNull>
<isNotNull property="cshape">and a.exno=0</isNotNull>
<isNotNull property="pcgno">and a.exno=0</isNotNull>
<isNotNull property="username">and u.username=#username#</isNotNull>
<isNotNull property="userid">and u.userid=#userid#</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="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
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
@ -901,6 +903,8 @@
left outer join cminningscd scd on scd.cmisno = le.cmisno
left outer join comcode cc1 on cc1.ccode = ppl.typegrade
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">
<isNotNull property="estart" prepend="and">scd.estart &gt;= #estart#</isNotNull>
<isNotNull property="eend" prepend="and">scd.eend &lt;= #eend#</isNotNull>

View File

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