|
|
@@ -105,6 +105,8 @@ func (s *SamplesInfoService) GetPagingEntitiesWithTb(acccode string, pageIndex,
|
|
|
}
|
|
|
tbldetail := acccode + SamplesDetailtbName
|
|
|
tblmain := acccode + SamplesMaintbName
|
|
|
+ tbsource := acccode + AnimalInfoName
|
|
|
+
|
|
|
//groupdetail := acccode + GroupDetailName
|
|
|
|
|
|
sqlCount := " select count(*) from " + tbldetail + " a left join " + tblmain + " b on a.SampleCode = b.SampleCode left join " + tbldonor + " c on b.SourceId = c.Id left join Shelf d on a.ShelfId=d.Id left join Box e on a.BoxId=e.Id left join Equipment f on a.EquipmentId=f.Id where " + where
|
|
|
@@ -113,12 +115,14 @@ func (s *SamplesInfoService) GetPagingEntitiesWithTb(acccode string, pageIndex,
|
|
|
var sql string
|
|
|
|
|
|
//sql = ` select a.*,b.*,c.Genus,concat(c.ProvinceName,c.CityName,c.StreetName,c.Address) as AddressName,c.SurveyDate,d.XStation ShelfX,d.YStation ShelfY,d.Code ShelfCode,e.XStation BoxX,e.YStation BoxY,e.Code BoxCode,f.Id Eid,f.Name EName,f.Code ECode,g.GroupId,g.GroupName from ` + tbldetail + ` a
|
|
|
- sql = ` select a.*,substr(a.SampleCode,6,4) as groupNo,b.*,c.Genus,concat(c.ProvinceName,c.CityName,c.StreetName,c.Address) as AddressName,c.SurveyDate,d.XStation ShelfX,d.YStation ShelfY,d.Code ShelfCode,e.XStation BoxX,e.YStation BoxY,e.Code BoxCode,f.Id Eid,f.Name EName,f.Code ECode from ` + tbldetail + ` a
|
|
|
+ sql = ` select a.*,substr(a.SampleCode,6,4) as groupNo,b.*,c.Genus,concat(c.ProvinceName,c.CityName,c.StreetName,c.Address) as AddressName,c.SurveyDate,
|
|
|
+ d.XStation ShelfX,d.YStation ShelfY,d.Code ShelfCode,e.XStation BoxX,e.YStation BoxY,e.Code BoxCode,f.Id Eid,f.Name EName,f.Code ECode, g.Longitude, g.Latitude, g.Altitude from ` + tbldetail + ` a
|
|
|
left join ` + tblmain + ` b on a.SampleCode = b.SampleCode
|
|
|
left join ` + tbldonor + ` c on b.SourceId = c.Id
|
|
|
left join Shelf d on a.ShelfId=d.Id
|
|
|
left join Box e on a.BoxId=e.Id
|
|
|
left join Equipment f on a.EquipmentId=f.Id
|
|
|
+ left join `+ tbsource + ` g on b.SourceId = g.Id
|
|
|
|
|
|
where ` + where + order + `
|
|
|
limit ` + utils.ToStr((pageIndex-1)*itemsPerPage) + "," + utils.ToStr(itemsPerPage) + ""
|