This commit is contained in:
parent
104df19143
commit
eacd0755c7
|
|
@ -364,11 +364,10 @@
|
|||
select c.lectno,c.completeno,c.completetime
|
||||
from (
|
||||
select t1.*
|
||||
<!--,concat('제 ',t1.cyear,' - ',t1.code1,t1.code2,t1.code3,' - ',lpad(ifnull(t2.seqNo,0)+ t1.rno , 6, 0)) completeno-->
|
||||
,concat('제 ',t1.cyear,t1.code1,lpad(ifnull(t2.seqNo,0)+ t1.rno , 6, 0)+'호') completeno
|
||||
,concat('제 ',t1.cyear,t1.code1,lpad(ifnull(t2.seqNo,0) + t1.rno , 6, 0), ' 호') as completeno
|
||||
from (
|
||||
select l.lectno
|
||||
,date_format(l.cdt,'%Y') cyear
|
||||
,date_format(l.edate,'%Y') cyear
|
||||
,pcg.cgcode code2
|
||||
,case when cm.cshape = 1 then 'F' else 'N' end code1
|
||||
,case when te.cremark = '1' then te.refcode
|
||||
|
|
@ -390,19 +389,19 @@
|
|||
where l.lectno in ($lectnos$)
|
||||
) t1
|
||||
left outer join (
|
||||
select date_format(l.cdt, '%Y') cyear,max(substring(l.completeno, -6)) seqNo
|
||||
select date_format(l.cdt, '%Y') cyear
|
||||
,replace(max(substring(l.completeno, -6)), ' 호','') seqNo
|
||||
from lect l
|
||||
group by date_format(l.cdt, '%Y')
|
||||
) t2 on t2.cyear = t1.cyear
|
||||
) c
|
||||
) b
|
||||
inner join cm c on c.cmno = l.cmno
|
||||
set l.uno = #uno#
|
||||
,l.udt = now()
|
||||
,l.uip= #uip#
|
||||
,l.iscomplete=1
|
||||
,l.completetime=b.completetime
|
||||
,l.completeno = case when l.completeno is not null then l.completeno else b.completeno end
|
||||
,l.completeno=b.completeno
|
||||
where l.lectno = b.lectno
|
||||
</update>
|
||||
<update id="grade.lectcomplete2" parameterClass="hashtable">
|
||||
|
|
@ -415,10 +414,11 @@
|
|||
from (
|
||||
select t1.*
|
||||
<!--,concat('제 ',t1.cyear,' - ',t1.code1,t1.code2,t1.code3,' - ',lpad(ifnull(t2.seqNo,0)+ t1.rno , 6, 0)) completeno-->
|
||||
,concat('제 ',t1.cyear,t1.code1,lpad(ifnull(t2.seqNo,0)+ t1.rno , 6, 0)) completeno
|
||||
<!--,concat('제 ',t1.cyear,t1.code1,lpad(ifnull(t2.seqNo,0)+ t1.rno , 6, 0)) completeno-->
|
||||
,concat('제 ',t1.cyear,t1.code1,lpad(ifnull(t2.seqNo,0) + t1.rno , 6, 0), ' 호') as completeno
|
||||
from (
|
||||
select l.lectno
|
||||
,date_format(l.cdt,'%Y') cyear
|
||||
,date_format(l.edate,'%Y') cyear
|
||||
,pcg.cgcode code2
|
||||
,case when cm.cshape = 1 then 'F' else 'N' end code1
|
||||
,case when te.cremark = '1' then te.refcode
|
||||
|
|
@ -442,7 +442,8 @@
|
|||
<isNotNull property="lectno">and l.lectno =#lectno#</isNotNull>
|
||||
) t1
|
||||
left outer join (
|
||||
select date_format(l.cdt, '%Y') cyear,max(substring(l.completeno, -6)) seqNo
|
||||
select date_format(l.cdt, '%Y') cyear
|
||||
,replace(max(substring(l.completeno, -6)), ' 호','') seqNo
|
||||
from lect l
|
||||
group by date_format(l.cdt, '%Y')
|
||||
) t2 on t2.cyear = t1.cyear
|
||||
|
|
|
|||
Loading…
Reference in New Issue