瀏覽代碼

耗材参数

XMLWAN 3 年之前
父節點
當前提交
ea6c9d06be
共有 1 個文件被更改,包括 10 次插入8 次删除
  1. 10 8
      controllers/stock_in_api_controller.go

+ 10 - 8
controllers/stock_in_api_controller.go 查看文件

1098
 					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
1098
 					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
1099
 					return
1099
 					return
1100
 				}
1100
 				}
1101
-				good_id := int64(items["good_id"].(float64))
1102
 
1101
 
1102
+				good_id := int64(items["good_id"].(float64))
1103
+				fmt.Println("stockout223232324343445456465656565565665", good_id)
1103
 				if items["good_type_id"] == nil || reflect.TypeOf(items["good_type_id"]).String() != "float64" {
1104
 				if items["good_type_id"] == nil || reflect.TypeOf(items["good_type_id"]).String() != "float64" {
1104
 					utils.ErrorLog("good_type_id")
1105
 					utils.ErrorLog("good_type_id")
1105
 					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
1106
 					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
1167
 		fmt.Println(parseDateErr)
1168
 		fmt.Println(parseDateErr)
1168
 	}
1169
 	}
1169
 
1170
 
1170
-	//errs := service.CreateWarehousingOutInfo(warehousingOutInfo)
1171
-	//info, _ := service.FindLastWarehousingOutInfo(warehouseOut.WarehouseOutOrderNumber)
1172
-	//if errs != nil {
1173
-	//	utils.ErrorLog(errs.Error())
1174
-	//	c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeCreateStockInFail)
1175
-	//	return
1176
-	//}
1171
+	errs := service.CreateWarehousingOutInfo(warehousingOutInfo)
1172
+	info, _ := service.FindLastWarehousingOutInfo(warehouseOut.WarehouseOutOrderNumber)
1173
+	if errs != nil {
1174
+		utils.ErrorLog(errs.Error())
1175
+		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeCreateStockInFail)
1176
+		return
1177
+	}
1177
 
1178
 
1178
 	c.ServeSuccessJSON(map[string]interface{}{
1179
 	c.ServeSuccessJSON(map[string]interface{}{
1179
 		"msg":                   "出库成功",
1180
 		"msg":                   "出库成功",
1181
+		"info":                  info,
1180
 		"warehousing_out_order": warehousing_out_order,
1182
 		"warehousing_out_order": warehousing_out_order,
1181
 	})
1183
 	})
1182
 
1184