|
@@ -6287,7 +6287,7 @@ func GetStockDamagedList(orgid int64, keyword string, page int64, limit int64, s
|
6287
|
6287
|
db = db.Where("x.storehouse_id = ?", storehouse_id)
|
6288
|
6288
|
}
|
6289
|
6289
|
|
6290
|
|
- err = db.Group("x.id").Select("x.ctime,x.id,x.good_name,x.specification_name,x.warehousing_unit,x.count,x.buy_price,x.packing_price,x.new_price,x.manufacturer,x.dealer,x.remark,x.good_id,x.warehousing_order,x.license_number,x.start_time,x.creater,x.checker,x.checker_status,x.checker_time,x.total,x.number,x.storehouse_id,t.packing_unit,r.user_name").Joins("left join sgj_users.sgj_user_admin_role as r on r.admin_user_id = x.creater").Joins("left join xt_good_information as t on t.id =x.good_id").Count(&total).Offset(offset).Limit(limit).Scan(&adjust).Error
|
|
6290
|
+ err = db.Group("x.good_id").Select("x.ctime,x.id,x.good_name,x.specification_name,x.warehousing_unit,x.count,x.buy_price,x.packing_price,x.new_price,x.manufacturer,x.dealer,x.remark,x.good_id,x.warehousing_order,x.license_number,x.start_time,x.creater,x.checker,x.checker_status,x.checker_time,x.total,x.number,x.storehouse_id,t.packing_unit,r.user_name").Joins("left join sgj_users.sgj_user_admin_role as r on r.admin_user_id = x.creater").Joins("left join xt_good_information as t on t.id =x.good_id").Count(&total).Offset(offset).Limit(limit).Scan(&adjust).Error
|
6291
|
6291
|
return adjust, total, err
|
6292
|
6292
|
|
6293
|
6293
|
}
|
|
@@ -8615,7 +8615,7 @@ func ReduceGoodSumOutCount(storehouse_id int64, good_id int64, user_org_id int64
|
8615
|
8615
|
|
8616
|
8616
|
func GetInvetoryWarehouseInfoList(orgid int64, storehouse_id int64) (info []*models.WarehousingInfo, err error) {
|
8617
|
8617
|
|
8618
|
|
- if orgid == 10191 {
|
|
8618
|
+ if orgid == 10191 || orgid == 10138 || orgid == 10278 {
|
8619
|
8619
|
err = XTReadDB().Model(&info).Where("status = 1 and storehouse_id=? and is_check= 1 and org_id = ?", storehouse_id, orgid).Preload("GoodInfo", "status = 1").Order("good_id").Find(&info).Error
|
8620
|
8620
|
return info, err
|
8621
|
8621
|
} else {
|