|
@@ -292,7 +292,7 @@ func (this *SamplesinputController) AnimalList() {
|
|
|
where = where + " and SourceName like '%" + donorname + "%'"
|
|
where = where + " and SourceName like '%" + donorname + "%'"
|
|
|
}
|
|
}
|
|
|
var list []samplesinfo.SamplesInfoList
|
|
var list []samplesinfo.SamplesInfoList
|
|
|
- total, list := svc.GetPagingEntitiesWithTb(this.User.AccCode, page.CurrentPage, page.Size, this.User.AccCode+AnimaltbName, "Id desc", where)
|
|
|
|
|
|
|
+ total, list := svc.GetPagingEntitiesWithTb(this.User.AccCode, page.CurrentPage, page.Size, this.User.AccCode+AnimaltbName, "SourceName, groupNo asc , sampletype", where)
|
|
|
|
|
|
|
|
var datainfo DataInfo
|
|
var datainfo DataInfo
|
|
|
datainfo.Items = list
|
|
datainfo.Items = list
|
|
@@ -2346,7 +2346,7 @@ func (this *SamplesinputController) Listajax() {
|
|
|
}
|
|
}
|
|
|
svc := samplesinfo.GetSamplesInfoService(utils.DBE)
|
|
svc := samplesinfo.GetSamplesInfoService(utils.DBE)
|
|
|
var samplespre []samplesinfo.SamplesInfoList
|
|
var samplespre []samplesinfo.SamplesInfoList
|
|
|
- total, samplespre := svc.GetPagingEntitiesWithTb(this.User.AccCode, page.CurrentPage, page.Size, this.User.AccCode+AnimaltbName, "a.Id desc", where)
|
|
|
|
|
|
|
+ total, samplespre := svc.GetPagingEntitiesWithTb(this.User.AccCode, page.CurrentPage, page.Size, this.User.AccCode+AnimaltbName, "SourceName, groupNo asc , sampletype", where)
|
|
|
|
|
|
|
|
var datainfo DataInfo
|
|
var datainfo DataInfo
|
|
|
datainfo.Items = samplespre
|
|
datainfo.Items = samplespre
|
|
@@ -2515,7 +2515,7 @@ func (this *SamplesinputController) DeleteTemplate() {
|
|
|
type searchTemplateField struct {
|
|
type searchTemplateField struct {
|
|
|
Field string //字段
|
|
Field string //字段
|
|
|
OrAnd string //与前值关系
|
|
OrAnd string //与前值关系
|
|
|
- Value string //树脂
|
|
|
|
|
|
|
+ Value string //数值
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
var a_table_fields_for_search = map[string]int{
|
|
var a_table_fields_for_search = map[string]int{
|
|
@@ -2579,12 +2579,14 @@ func (this *SamplesinputController) SearchList() {
|
|
|
this.ServeJSON()
|
|
this.ServeJSON()
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- where := " IState =1 and DeletionStateCode=0 "
|
|
|
|
|
//设备权限
|
|
//设备权限
|
|
|
- svcs := equipment.GetEquipmentService(utils.DBE)
|
|
|
|
|
- poweeids := svcs.GetPowerEquipmentids(this.User.AccCode, utils.ToStr(this.User.Id))
|
|
|
|
|
- where = where + " and a.EquipmentId in(" + strings.Join(poweeids, ",") + ")"
|
|
|
|
|
|
|
+ svcPermission := permission.GetPermissionService(utils.DBE)
|
|
|
|
|
+ eids := svcPermission.GetEquipmentIdById(utils.ToStr(this.User.Id))
|
|
|
|
|
+ where := " IState =1 and DeletionStateCode=0 and (f.CreateUserId= " + utils.ToStr(this.User.Id) + " or a.EquipmentId in ("+eids+"))"
|
|
|
|
|
+ //设备权限
|
|
|
|
|
+ //svcs := equipment.GetEquipmentService(utils.DBE)
|
|
|
|
|
+ //poweeids := svcs.GetPowerEquipmentids(this.User.AccCode, utils.ToStr(this.User.Id))
|
|
|
|
|
+ //where = where + " and a.EquipmentId in(" + strings.Join(poweeids, ",") + ")"
|
|
|
|
|
|
|
|
for i, field := range fields {
|
|
for i, field := range fields {
|
|
|
if i != 0 {
|
|
if i != 0 {
|
|
@@ -2629,7 +2631,8 @@ func (this *SamplesinputController) SearchList() {
|
|
|
where += ")"
|
|
where += ")"
|
|
|
|
|
|
|
|
var list []samplesinfo.SamplesInfoList
|
|
var list []samplesinfo.SamplesInfoList
|
|
|
- total, list := svc.GetPagingEntitiesWithOrderSearch(this.User.AccCode, page.CurrentPage, page.Size, "Id desc", where)
|
|
|
|
|
|
|
+ //total, list := svc.GetPagingEntitiesWithOrderSearch(this.User.AccCode, page.CurrentPage, page.Size, "SourceName, groupNo asc , sampletype", where)
|
|
|
|
|
+ total, list := svc.GetPagingEntitiesWithTb(this.User.AccCode, page.CurrentPage, page.Size, this.User.AccCode+AnimaltbName, "SourceName, groupNo asc , sampletype", where)
|
|
|
|
|
|
|
|
var datainfo DataInfo
|
|
var datainfo DataInfo
|
|
|
datainfo.Items = list
|
|
datainfo.Items = list
|