This commit is contained in:
hodong13 2020-10-21 06:18:49 +00:00
parent a0305a30f9
commit d5fccf7a61
2 changed files with 3 additions and 2 deletions

View File

@ -412,6 +412,7 @@ create table cm (
,typeedu varchar(100) null ,typeedu varchar(100) null
,typegrade varchar(100) null ,typegrade varchar(100) null
,typejob varchar(100) null ,typejob varchar(100) null
,iscertificate tinyint not null default 1
,isdel tinyint not null ,isdel tinyint not null
,cdt datetime not null,cno bigint not NULL,udt datetime not null,uno bigint not NULL,uip varchar(50) not NULL ,cdt datetime not null,cno bigint not NULL,udt datetime not null,uno bigint not NULL,uip varchar(50) not NULL
,primary key(cmno)); ,primary key(cmno));

View File

@ -1202,14 +1202,14 @@
</select> </select>
<insert id="cm.cmcopy0" parameterClass="cm"> <insert id="cm.cmcopy0" parameterClass="cm">
insert into cm(ismaster,cgno,pcmno,cname,kname,tmno,classno,rstime,retime,sstime,setime,gstime,getime,cshape,typeman,typeedu,typegrade,typejob,infee,outfee,quota,introhtml,targethtml,goalhtml,contenthtml,studyplace,studytime insert into cm(ismaster,cgno,pcmno,cname,kname,tmno,classno,rstime,retime,sstime,setime,gstime,getime,cshape,typeman,typeedu,typegrade,typejob,infee,outfee,quota,introhtml,targethtml,goalhtml,contenthtml,studyplace,studytime
,certcc,certgradecc,jobcc,jobpositiongrade,difficulty,isrefund,isuse,isseq,isdel,<include refid="sql.inc"></include>) ,certcc,certgradecc,jobcc,jobpositiongrade,difficulty,isrefund,isuse,isseq,iscertificate,isdel,<include refid="sql.inc"></include>)
select #ismaster#,cgno,case when a.ismaster = 1 and #ismaster# = 0 then a.cmno else a.pcmno end,ifnull(#cname#, concat('사본_', cname)),a.kname,#tmno# select #ismaster#,cgno,case when a.ismaster = 1 and #ismaster# = 0 then a.cmno else a.pcmno end,ifnull(#cname#, concat('사본_', cname)),a.kname,#tmno#
,case when #tmno# is null then null else ifnull(b.classno,0)+1 end ,case when #tmno# is null then null else ifnull(b.classno,0)+1 end
,t.rstime,date_format(t.retime,'%Y-%m-%d 23:59:59') retime ,t.rstime,date_format(t.retime,'%Y-%m-%d 23:59:59') retime
,t.sstime,date_format(t.setime,'%Y-%m-%d 23:59:59') setime ,t.sstime,date_format(t.setime,'%Y-%m-%d 23:59:59') setime
,t.gstime,date_format(t.getime,'%Y-%m-%d 23:59:59') getime ,t.gstime,date_format(t.getime,'%Y-%m-%d 23:59:59') getime
,a.cshape,a.typeman,a.typeedu,a.typegrade,a.typejob,infee,outfee,quota,introhtml,targethtml,goalhtml,contenthtml,studyplace,studytime ,a.cshape,a.typeman,a.typeedu,a.typegrade,a.typejob,infee,outfee,quota,introhtml,targethtml,goalhtml,contenthtml,studyplace,studytime
,certcc,certgradecc,jobcc,jobpositiongrade,difficulty,isrefund,1,isseq,0,<include refid="sql.inv"></include> ,certcc,certgradecc,jobcc,jobpositiongrade,difficulty,isrefund,1,isseq,a.iscertificate,0,<include refid="sql.inv"></include>
from cm a from cm a
left outer join ( left outer join (
select max(b.classno) classno select max(b.classno) classno