|
|
@@ -19,6 +19,77 @@ type SupplierfileController struct {
|
|
|
BaseController
|
|
|
}
|
|
|
|
|
|
+// @Title 文件上传
|
|
|
+// @Description get user by tokenaddsubfile
|
|
|
+// @Success 200 {object} models.Userblood
|
|
|
+// @router /filelistall [get]
|
|
|
+func (this *SupplierfileController) AllFileList() {
|
|
|
+ page := this.GetPageInfoForm()
|
|
|
+ var list []supplierfile.OilSupplierFile
|
|
|
+ svc := supplierfile.GetSupplierfileService(utils.DBE)
|
|
|
+ where := " 1=1"
|
|
|
+ orderby := "Id"
|
|
|
+ asc := true
|
|
|
+ Order := this.GetString("Order")
|
|
|
+ Prop := this.GetString("Prop")
|
|
|
+ if Order != "" && Prop != "" {
|
|
|
+ orderby = Prop
|
|
|
+ if Order == "asc" {
|
|
|
+ asc = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ SupplierId := this.GetString("SupplierId")
|
|
|
+ if SupplierId != "" {
|
|
|
+ where = where + " and SupplierId = '" + SupplierId + "'"
|
|
|
+ }
|
|
|
+ SupplierTypeCode := this.GetString("SupplierTypeCode")
|
|
|
+ if SupplierTypeCode != "" {
|
|
|
+ where = where + " and SupplierTypeCode in ( '000', '" + SupplierTypeCode + "')"
|
|
|
+ }
|
|
|
+ total := svc.GetPagingEntitiesWithoutAccCode(page.CurrentPage, page.Size, orderby, asc, &list, where)
|
|
|
+ var datainfo DataInfo
|
|
|
+ datainfo.Items = list
|
|
|
+ datainfo.CurrentItemCount = total
|
|
|
+ this.Data["json"] = &datainfo
|
|
|
+ this.ServeJSON()
|
|
|
+}
|
|
|
+
|
|
|
+// @Title 文件上传
|
|
|
+// @Description get user by tokenaddsubfile
|
|
|
+// @Success 200 {object} models.Userblood
|
|
|
+// @router /filelistappend [get]
|
|
|
+func (this *SupplierfileController) FileListAppend() {
|
|
|
+ page := this.GetPageInfoForm()
|
|
|
+ var list []supplierfile.OilSupplierFile
|
|
|
+ svc := supplierfile.GetSupplierfileService(utils.DBE)
|
|
|
+ where := " 1=1"
|
|
|
+ orderby := "Id"
|
|
|
+ asc := true
|
|
|
+ Order := this.GetString("Order")
|
|
|
+ Prop := this.GetString("Prop")
|
|
|
+ if Order != "" && Prop != "" {
|
|
|
+ orderby = Prop
|
|
|
+ if Order == "asc" {
|
|
|
+ asc = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ SupplierId := this.GetString("SupplierId")
|
|
|
+ if SupplierId != "" {
|
|
|
+ where = where + " and SupplierId = '" + SupplierId + "'"
|
|
|
+ }
|
|
|
+ SupplierTypeCode := this.GetString("SupplierTypeCode")
|
|
|
+ if SupplierTypeCode != "" {
|
|
|
+ where = where + " and SupplierTypeCode in ( '000', '" + SupplierTypeCode + "')"
|
|
|
+ }
|
|
|
+ where = where + " and SupType != 1"
|
|
|
+ total := svc.GetPagingEntitiesWithoutAccCode(page.CurrentPage, page.Size, orderby, asc, &list, where)
|
|
|
+ var datainfo DataInfo
|
|
|
+ datainfo.Items = list
|
|
|
+ datainfo.CurrentItemCount = total
|
|
|
+ this.Data["json"] = &datainfo
|
|
|
+ this.ServeJSON()
|
|
|
+}
|
|
|
+
|
|
|
// @Title 文件上传
|
|
|
// @Description get user by tokenaddsubfile
|
|
|
// @Success 200 {object} models.Userblood
|
|
|
@@ -46,6 +117,7 @@ func (this *SupplierfileController) FileList() {
|
|
|
if SupplierTypeCode != "" {
|
|
|
where = where + " and SupplierTypeCode in ( '000', '" + SupplierTypeCode + "')"
|
|
|
}
|
|
|
+ where = where + " and SupType != 2"
|
|
|
total := svc.GetPagingEntitiesWithoutAccCode(page.CurrentPage, page.Size, orderby, asc, &list, where)
|
|
|
var datainfo DataInfo
|
|
|
datainfo.Items = list
|