|
@@ -1846,6 +1846,14 @@ func (this *SelfDrugApiController) SaveDrugInventory() {
|
1846
|
1846
|
return
|
1847
|
1847
|
}
|
1848
|
1848
|
warehouse_info_id := int64(items["warehouse_info_id"].(float64))
|
|
1849
|
+
|
|
1850
|
+ if items["total"] == nil || reflect.TypeOf(items["total"]).String() != "string" {
|
|
1851
|
+ utils.ErrorLog("total")
|
|
1852
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
|
1853
|
+ return
|
|
1854
|
+ }
|
|
1855
|
+
|
|
1856
|
+ total := items["total"].(string)
|
1849
|
1857
|
inventory := models.XtDrugInventory{
|
1850
|
1858
|
|
1851
|
1859
|
DrugName: drug_name,
|
|
@@ -1874,6 +1882,7 @@ func (this *SelfDrugApiController) SaveDrugInventory() {
|
1874
|
1882
|
ProductDate: product_date,
|
1875
|
1883
|
Number: numbers,
|
1876
|
1884
|
//BatchNumber: batch_number,
|
|
1885
|
+ Total: total,
|
1877
|
1886
|
WarehouseInfoId: warehouse_info_id,
|
1878
|
1887
|
}
|
1879
|
1888
|
err = service.CreateDrugInventory(inventory)
|
|
@@ -1893,7 +1902,6 @@ func (this *SelfDrugApiController) GetDrugInventoryList() {
|
1893
|
1902
|
fmt.Println(err)
|
1894
|
1903
|
orgId := this.GetAdminUserInfo().CurrentOrgId
|
1895
|
1904
|
keyword := this.GetString("keyword")
|
1896
|
|
- fmt.Println("keywoer2r2r32rwrwr", keyword)
|
1897
|
1905
|
start_time := this.GetString("start_time")
|
1898
|
1906
|
end_time := this.GetString("end_time")
|
1899
|
1907
|
var startTime int64
|