|
@@ -666,11 +666,11 @@ func CreateNewDrugWarehousingInfo(warehousingInfo []*models.DrugWarehouseInfo, t
|
666
|
666
|
if len(warehousingInfo) > 0 {
|
667
|
667
|
|
668
|
668
|
if len(warehousingInfo) > 0 {
|
669
|
|
- thisSQL := "INSERT INTO xt_drug_warehouse_info (warehousing_id, drug_id, number, product_date,expiry_date,warehousing_count,price,total_price,dealer,manufacturer,remark,ctime,mtime,status,org_id,warehousing_order,type,retail_price,retail_total_price,stock_max_number,max_unit,min_unit,batch_number,stock_min_number,storehouse_id) VALUES "
|
|
669
|
+ thisSQL := "INSERT INTO xt_drug_warehouse_info (warehousing_id, drug_id, number, product_date,expiry_date,warehousing_count,price,total_price,dealer,manufacturer,remark,ctime,mtime,status,org_id,warehousing_order,type,retail_price,retail_total_price,stock_max_number,max_unit,min_unit,batch_number,stock_min_number,storehouse_id,drug_code) VALUES "
|
670
|
670
|
insertParams := make([]string, 0)
|
671
|
671
|
insertData := make([]interface{}, 0)
|
672
|
672
|
for _, info := range warehousingInfo {
|
673
|
|
- insertParams = append(insertParams, "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")
|
|
673
|
+ insertParams = append(insertParams, "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")
|
674
|
674
|
insertData = append(insertData, info.WarehousingId)
|
675
|
675
|
insertData = append(insertData, info.DrugId)
|
676
|
676
|
insertData = append(insertData, info.Number)
|
|
@@ -696,6 +696,7 @@ func CreateNewDrugWarehousingInfo(warehousingInfo []*models.DrugWarehouseInfo, t
|
696
|
696
|
insertData = append(insertData, info.BatchNumber)
|
697
|
697
|
insertData = append(insertData, info.StockMinNumber)
|
698
|
698
|
insertData = append(insertData, info.StorehouseId)
|
|
699
|
+ insertData = append(insertData, info.DrugCode)
|
699
|
700
|
}
|
700
|
701
|
thisSQL += strings.Join(insertParams, ", ")
|
701
|
702
|
err = tx.Exec(thisSQL, insertData...).Error
|