Browse Source

提交

master
学 赵 4 years ago
parent
commit
ae228f26af
  1. 6
      SCP/Views/PlanData/SCP_PO_PLAN_EXTEND.aspx.cs

6
SCP/Views/PlanData/SCP_PO_PLAN_EXTEND.aspx.cs

@ -49,7 +49,11 @@ namespace SCP.PlanData
SearchV_TB_PO((result)=> { SearchV_TB_PO((result)=> {
Grid_V_TB_PO.RecordCount = result.Count(); Grid_V_TB_PO.RecordCount = result.Count();
var list = SortAndPage<V_TB_PO>(result, Grid_V_TB_PO); var list = SortAndPage<V_TB_PO>(result, Grid_V_TB_PO);
string str = "SELECT MAX(B.EndTime) EndTime ,a.PoBillNum ,a.site,max(B.Version) AS Version FROM V_TB_PO A INNER JOIN V_TB_PO_PLAN_EXTEND B ON A.PoBillNum = B.PoBillNum AND B.AskBillNum <> '' and a.Site = b.Domain GROUP BY A.PoBillNum,a.Site";
string str = "SELECT MAX(A.EndTime) EndTime ,A.PoBillNum ,Domain AS SITE,max(Version) AS Version\n" +
" FROM [TB_PO_PLAN_EXTEND] A left join TB_ASK B ON A.PoBillNum=B.PoBillNum AND A.Domain=B.Site and A.EndTime=B.EndTime\n" +
" where A.IsDeleted=0 AND B.IsDeleted=0 AND B.AskBillNum<>'' group by A.PoBillNum, a.Domain";
var _tempList= SCPDB.Database.SqlQuery<TempPlan>(str).ToList(); var _tempList= SCPDB.Database.SqlQuery<TempPlan>(str).ToList();
foreach (var itm in list) foreach (var itm in list)
{ {

Loading…
Cancel
Save