|
|
@@ -17,14 +17,14 @@ func GetOrderGoodsByRecordId(eg *xorm.Engine, id string) *model.OrderGoodsDoing |
|
|
|
func GetOrderGoodsDoingList(eg *xorm.Engine, param map[string]string) (*[]model.OrderGoodsDoing, int64) { |
|
|
|
var order []model.OrderGoodsDoing |
|
|
|
sess := eg.Where("1=1") |
|
|
|
if param["enterprise_name"] != "" { |
|
|
|
var data []model.Enterprise |
|
|
|
eg.Where("name like ?", "%"+param["enterprise_name"]+"%") |
|
|
|
if param["admin_name"] != "" { |
|
|
|
var data []model.Admin |
|
|
|
eg.Where("memo like ?", "%"+param["admin_name"]+"%") |
|
|
|
ids := []int{-1} |
|
|
|
for _, v := range data { |
|
|
|
ids = append(ids, v.Id) |
|
|
|
ids = append(ids, v.AdmId) |
|
|
|
} |
|
|
|
sess.In("enterprise_id", ids) |
|
|
|
sess.In("admin_id", ids) |
|
|
|
} |
|
|
|
if param["oid"] != "" { |
|
|
|
sess.And("oid like ?", "%"+param["oid"]+"%") |
|
|
@@ -32,8 +32,8 @@ func GetOrderGoodsDoingList(eg *xorm.Engine, param map[string]string) (*[]model. |
|
|
|
if param["state"] != "" { |
|
|
|
sess.And("state =?", param["state"]) |
|
|
|
} |
|
|
|
if param["admin_id"] != "" { |
|
|
|
sess.And("admin_id =?", param["admin_id"]) |
|
|
|
if param["enterprise_id"] != "" { |
|
|
|
sess.And("enterprise_id =?", param["enterprise_id"]) |
|
|
|
} |
|
|
|
if param["goods_title"] != "" { |
|
|
|
sess.And("goods_title like ?", "%"+param["goods_title"]+"%") |
|
|
|