기능개선
-- 과제첨삭솔루션 실서버만 연동되어 있음 구분값에 따라서 쿼리개선(배포할때 계속 확인해줘야해서 수정) web.config(isstaging값 확인)
This commit is contained in:
parent
7885d22a3c
commit
760e82feb1
|
|
@ -600,7 +600,7 @@ namespace NP.BO.Controllers
|
|||
}
|
||||
if (vm.CMSDs.Count() > 0)
|
||||
{
|
||||
vm.LectSDs = Dao.Get<LectSD>("lect.lectsds", new System.Collections.Hashtable() { { "cmno", vm.CM.cmno }, { "sdno", !string.IsNullOrEmpty(vm.addstringval) ? GetInt(vm.addstringval) : vm.CMSDs.First().sdno }, { "isrebate", vm.addstringval2 }, { "sdstate", vm.addstringval3 } });
|
||||
vm.LectSDs = Dao.Get<LectSD>("lect.lectsds", new System.Collections.Hashtable() { { "cmno", vm.CM.cmno }, { "sdno", !string.IsNullOrEmpty(vm.addstringval) ? GetInt(vm.addstringval) : vm.CMSDs.First().sdno }, { "isrebate", vm.addstringval2 }, { "sdstate", vm.addstringval3 }, { "isproduct" + (GetConfig("isstaging") == "1" ? "x" : ""), 1 } });
|
||||
}
|
||||
vm.pagetotalcount = GetCount(vm.LectSDs);
|
||||
}
|
||||
|
|
@ -695,6 +695,7 @@ namespace NP.BO.Controllers
|
|||
ht.Add("sdtype", 0);
|
||||
vm.LectSDs = new List<LectSD>() { };
|
||||
ht.Add("sdstate", vm.addstringval2);
|
||||
ht.Add("isproduct" + (GetConfig("isstaging") == "1" ? "x" : ""), 1);
|
||||
vm.LectSDs = Dao.Get<LectSD>("lect.lectsds.all", ht);
|
||||
vm.pagetotalcount = GetCount(vm.LectSDs.FirstOrDefault());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -593,7 +593,7 @@ namespace NP.Base.Controllers
|
|||
[HttpPost]
|
||||
public JsonResult LectSDs(int cmno, int sdno, int? isrebate = null, int? sdstate = null)
|
||||
{
|
||||
return JsonBack(Dao.Get<LectSD>("lect.lectsds", new System.Collections.Hashtable() { { "cmno", cmno }, { "sdno", sdno }, { "isrebate", isrebate }, { "estate", sdstate } }));
|
||||
return JsonBack(Dao.Get<LectSD>("lect.lectsds", new System.Collections.Hashtable() { { "cmno", cmno }, { "sdno", sdno }, { "isrebate", isrebate }, { "estate", sdstate },{"isproduct"+ (GetConfig("isstaging") == "1" ? "x" : ""), 1 } }));
|
||||
}
|
||||
[HttpPost]
|
||||
public JsonResult LectAllSDs(int pagenum,int pagerowcount,String edate,String cname,String cnamestr,String searchtype,String searchtext,String sdateall,String edateall,String asname, int? studyplace = null, int? iscomplete = null, int? cshape = null, int? sdstate = null,int? sdtype = 0)
|
||||
|
|
@ -601,17 +601,18 @@ namespace NP.Base.Controllers
|
|||
pagenum = pagenum < 1 ? 1 : pagenum;
|
||||
pagerowcount = pagerowcount < 1 ? PageRowCount : pagerowcount;
|
||||
|
||||
return JsonBack(Dao.Get<LectSD>("lect.lectsds.all", new System.Collections.Hashtable() { { "estate", sdstate }, { "pagenum", pagenum }, { "pagerowsize", pagerowcount }, { "edate", edate },{"sdateall",sdateall },{"edateall",edateall }, { "cshape", cshape }, { "cname", cname }, { "cnamestr", cnamestr }, { "iscomplete", iscomplete }, { "studyplace", studyplace }, { "searchtype", searchtype }, {"searchtext",searchtext } ,{"sdtype",sdtype },{"asname",asname } }));
|
||||
return JsonBack(Dao.Get<LectSD>("lect.lectsds.all", new System.Collections.Hashtable() { { "estate", sdstate }, { "pagenum", pagenum }, { "pagerowsize", pagerowcount }, { "edate", edate },{"sdateall",sdateall },{"edateall",edateall }, { "cshape", cshape }, { "cname", cname }, { "cnamestr", cnamestr }, { "iscomplete", iscomplete }, { "studyplace", studyplace }, { "searchtype", searchtype }, {"searchtext",searchtext } ,{"sdtype",sdtype },{"asname",asname }, { "isproduct" + (GetConfig("isstaging") == "1" ? "x" : ""), 1 }, }));
|
||||
}
|
||||
[HttpPost]
|
||||
public JsonResult LectSD(Int64 lectno, int sdno)
|
||||
{
|
||||
return JsonBack(Dao.Get<LectSD>("lect.lectsd", new Hashtable() { { "lectno", lectno }, { "sdno", sdno } }).First());
|
||||
return JsonBack(Dao.Get<LectSD>("lect.lectsd", new Hashtable() { { "lectno", lectno }, { "sdno", sdno }, { "isproduct" + (GetConfig("isstaging") == "1" ? "x" : ""), 1 } }).First());
|
||||
}
|
||||
[HttpPost]
|
||||
public JsonResult LectSDSave(LectSD d)
|
||||
{
|
||||
d.uno = SUserInfo.UserNo; d.uip = GetUserIP();
|
||||
d.isproduct = GetConfig("isstaging") == "1" ? (int?)null : 1;
|
||||
return JsonOK(Dao.Save("lect.lectsd"+(d.ccount == 1 ? "2" : "")+".save" + (string.IsNullOrEmpty(d.lectnos) ? "" : "batch"), d));
|
||||
}
|
||||
[HttpGet]
|
||||
|
|
|
|||
|
|
@ -1050,7 +1050,7 @@
|
|||
<select id="lect.lectsds" parameterClass="hashtable" resultClass="lectsd">
|
||||
select a.lectno,a.userno,a.cmno,a.isrebate
|
||||
,b.sdno
|
||||
,c.atext,c.fgno,round((f.MAX_SCORE/100)) copyrate,c.iscopy,c.cpoint,c.feedb,c.submittime,c.submitip,c.checktime,c.checkip
|
||||
,c.atext,c.fgno<isNotNull property="isproduct" >,round((f.MAX_SCORE/100)) copyrate</isNotNull>,c.iscopy,c.cpoint,c.feedb,c.submittime,c.submitip,c.checktime,c.checkip
|
||||
,cf.fileno,cf.orgname,cf.fileurl
|
||||
,d.username,d.userid
|
||||
,e.asname
|
||||
|
|
@ -1062,7 +1062,7 @@
|
|||
left outer join fileinfo cf on cf.fgno=c.fgno and cf.isdel=0
|
||||
inner join users d on d.userno=a.userno
|
||||
left outer join assign e on e.asno=d.asno
|
||||
left outer join mch_source_v_lectsd_list f on f.DOC_ID = concat(b.sdno ,'_',a.lectno )
|
||||
<isNotNull property="isproduct">left outer join mch_source_v_lectsd_list f on f.DOC_ID = concat(b.sdno ,'_',a.lectno )</isNotNull>
|
||||
where a.status=1 and a.ischanged=0
|
||||
<isNotNull property="sdtype">and b.sdtype=#sdtype#</isNotNull>
|
||||
<isNotNull property="cmno">and a.cmno=#cmno# </isNotNull>
|
||||
|
|
@ -1080,7 +1080,7 @@
|
|||
,p.payoktime,a.sdate,a.edate
|
||||
,g.cname,g.cshape
|
||||
,b.sdno,b.tpoint
|
||||
,c.atext,round((f.MAX_SCORE/100)) copyrate,c.iscopy,c.cpoint,c.feedb,c.submittime,c.submitip,c.checktime,c.checkip
|
||||
,c.atext<isNotNull property="isproduct">,round((f.MAX_SCORE/100)) copyrate</isNotNull>,c.iscopy,c.cpoint,c.feedb,c.submittime,c.submitip,c.checktime,c.checkip
|
||||
,d.username,d.userid,d.usertype
|
||||
,e.asname
|
||||
,h.cmisno,h.estart lestart,h.eend leend,h.sseq
|
||||
|
|
@ -1095,7 +1095,7 @@
|
|||
left outer join lectsd c on c.lectno = a.lectno and c.sdno = b.sdno
|
||||
inner join users d on d.userno = a.userno
|
||||
left outer join assign e on e.asno = d.asno
|
||||
left outer join mch_source_v_lectsd_list f on f.DOC_ID = concat(b.sdno ,'_',a.lectno )
|
||||
<isNotNull property="isproduct">left outer join mch_source_v_lectsd_list f on f.DOC_ID = concat(b.sdno ,'_',a.lectno )</isNotNull>
|
||||
left outer join cminningscd h on h.cmisno = a.cmisno
|
||||
left outer join comcode i on i.ccode = h.studyplace and i.isuse=1
|
||||
where a.status=1 and a.ischanged=0
|
||||
|
|
@ -1129,7 +1129,7 @@
|
|||
</select>
|
||||
<select id="lect.lectsd" parameterClass="hashtable" resultClass="lectsd">
|
||||
select a.sdno,a.tpoint sdtpoint
|
||||
,b.lectno,b.atext,b.fgno,round((g.MAX_SCORE/100)) copyrate,b.iscopy,b.cpoint,b.feedb,b.submittime,b.checktime
|
||||
,b.lectno,b.atext,b.fgno<isNotNull property="isproduct">,round((g.MAX_SCORE/100)) copyrate</isNotNull>,b.iscopy,b.cpoint,b.feedb,b.submittime,b.checktime
|
||||
,c.userno,c.username,c.userid
|
||||
,d.asname
|
||||
,f.fileno,f.orgname,f.fileurl
|
||||
|
|
@ -1139,7 +1139,7 @@
|
|||
left outer join assign d on d.asno=c.asno
|
||||
left outer join lectsd b on b.lectno=b2.lectno and b.sdno=a.sdno
|
||||
left outer join fileinfo f on f.fgno=b.fgno and f.isdel=0
|
||||
left outer join mch_source_v_lectsd_list g on g.DOC_ID = concat(b.sdno ,'_',b.lectno )
|
||||
<isNotNull property="isproduct">left outer join mch_source_v_lectsd_list g on g.DOC_ID = concat(b.sdno ,'_',b.lectno )</isNotNull>
|
||||
where a.sdno=#sdno#
|
||||
</select>
|
||||
<update id="lect.lectsd.save" parameterClass="lectsd">
|
||||
|
|
|
|||
|
|
@ -3720,6 +3720,7 @@ namespace NP.Model
|
|||
}
|
||||
}
|
||||
}
|
||||
public int? isproduct { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 토론글
|
||||
|
|
|
|||
Loading…
Reference in New Issue