|
|
@@ -1699,76 +1699,46 @@ func (this *SamplesinputController) DaySaveXlsx(name string, title []string, col
|
|
|
// @router /getlistajax [get]
|
|
|
func (this *SamplesinputController) Listajax() {
|
|
|
page := this.GetPageInfoForm()
|
|
|
-
|
|
|
- this.Data["PageTitle"] = "预录入管理"
|
|
|
- search := this.GetString("search1")
|
|
|
- name := this.GetString("name1")
|
|
|
- sampletype1 := this.GetString("SampleType1")
|
|
|
- fname1 := this.GetString("fname1")
|
|
|
- // fid := this.GetString("fid1")
|
|
|
- // samplingsite := this.GetString("SamplingSite1")
|
|
|
- samplingsitename := this.GetString("SamplingSiteName1")
|
|
|
- validity := this.GetString("validity1")
|
|
|
- validity_start, _ := utils.TimeParse(this.GetString("validity1")+" 00:00:00", "2006-1-2 15:4:5")
|
|
|
- enddate := this.GetString("enddate1")
|
|
|
- enddate_end, _ := utils.TimeParse(enddate+" 23:59:59", "2006-1-2 15:4:5")
|
|
|
- createby := this.GetString("CreateBy1")
|
|
|
- sbarcode := this.GetString("sbarcode1")
|
|
|
+ barcode := this.GetString("barcode")
|
|
|
+ samplecode := this.GetString("samplecode")
|
|
|
+ name := this.GetString("name")
|
|
|
+ operator := this.GetString("operator")
|
|
|
+ sampletype := this.GetString("sampletype")
|
|
|
+ ReceiveDate := this.GetString("ReceiveDate")
|
|
|
|
|
|
where := " IState in (2,3,4,7,8) and DeletionStateCode=0 "
|
|
|
- if search != "" {
|
|
|
- where = where + " and a.SampleCode '%" + search + "%' "
|
|
|
+ if barcode != "" {
|
|
|
+ where = where + " and a.BarCode like '%" + barcode + "%' "
|
|
|
}
|
|
|
- if sbarcode != "" {
|
|
|
- where = where + " and BarCode like '%" + sbarcode + "%' "
|
|
|
+ if samplecode != "" {
|
|
|
+ where = where + " and a.SampleCode like '%" + samplecode + "%' "
|
|
|
}
|
|
|
if name != "" {
|
|
|
- where = where + " and Name ='" + name + "'"
|
|
|
- }
|
|
|
- if sampletype1 != "" {
|
|
|
- where = where + " and SampleType =" + sampletype1 + ""
|
|
|
+ where = where + " and b.Name like '%" + name + "%' "
|
|
|
}
|
|
|
- if fname1 != "" {
|
|
|
- where = where + " and SamplingOrganName ='" + fname1 + "'"
|
|
|
+ if operator != "" {
|
|
|
+ where = where + " and a.CreateBy like '%" + operator + "%' "
|
|
|
}
|
|
|
- if samplingsitename != "" {
|
|
|
- where = where + " and SamplingSiteName ='" + samplingsitename + "'"
|
|
|
- }
|
|
|
- if validity != "" {
|
|
|
- where = where + " and a.CreateOn >'" + utils.ToStr(validity_start) + "'"
|
|
|
- }
|
|
|
- if enddate != "" {
|
|
|
- where = where + " and a.CreateOn <'" + utils.ToStr(enddate_end) + "'"
|
|
|
- }
|
|
|
- if createby != "" {
|
|
|
- where = where + "and a.CreateBy ='" + createby + "'"
|
|
|
+ if sampletype != "" {
|
|
|
+ where = where + " and b.SampleType = '" + sampletype + "' "
|
|
|
+ }
|
|
|
+ if ReceiveDate != "" {
|
|
|
+ dates := strings.Split(ReceiveDate, ",")
|
|
|
+ if len(dates) == 2 {
|
|
|
+ minDate := dates[0]
|
|
|
+ maxDate := dates[1]
|
|
|
+ where = where + " and ReceiveDate>='" + minDate + "' and ReceiveDate<='" + maxDate + "'"
|
|
|
+ }
|
|
|
}
|
|
|
- //样本类型
|
|
|
- // sample_type := sampletype.GetSampleTypeService(utils.DBE)
|
|
|
- // where2 := " AccCode='" + this.User.AccCode + "'"
|
|
|
- // list := sample_type.ListSampleType(where2)
|
|
|
- // this.Data["entitySampleType"] = list
|
|
|
-
|
|
|
- //绑定组织器官
|
|
|
- // svcOrgan := sampleorgan.GetSampleOrganService(utils.DBE)
|
|
|
- // where3 := "where AccCode = '" + this.User.AccCode + "' and Item=1 "
|
|
|
- // operationtree := svcOrgan.GetTreeList(where3)
|
|
|
- // this.Data["operation"] = operationtree
|
|
|
-
|
|
|
svc := samplesinfo.GetSamplesInfoService(utils.DBE)
|
|
|
var samplespre []samplesinfo.SamplesInfoList
|
|
|
- total, samplespre := svc.GetPagingEntitiesWithOrderSearch(this.User.AccCode, page.CurrentPage, page.Size, "a.Id desc", where)
|
|
|
+ total, samplespre := svc.GetPagingEntitiesWithTb(this.User.AccCode, page.CurrentPage, page.Size, this.User.AccCode+AnimaltbName, "a.Id desc", where)
|
|
|
|
|
|
var datainfo DataInfo
|
|
|
datainfo.Items = samplespre
|
|
|
datainfo.CurrentItemCount = total
|
|
|
this.Data["json"] = &datainfo
|
|
|
this.ServeJSON()
|
|
|
- //列表扩展列
|
|
|
- // svclistextend := listextend.GetListExtendService(utils.DBE)
|
|
|
- // listextenddata := svclistextend.GetInfoByFunc(this.User.AccCode, "预录入样本")
|
|
|
- // this.Data["listextenddata"] = listextenddata
|
|
|
- // fmt.Println("-----------------------listextenddata:", listextenddata)
|
|
|
}
|
|
|
|
|
|
// @Title 获取搜索模版列表
|