Browse Source

Merge branch '20201014_xt_api_new_branch' of http://git.shengws.com/csx/XT_New into 20201014_xt_api_new_branch

csx 3 years ago
parent
commit
bc4cb665d0
1 changed files with 10 additions and 8 deletions
  1. 10 8
      controllers/stock_in_api_controller.go

+ 10 - 8
controllers/stock_in_api_controller.go View File

@@ -1098,8 +1098,9 @@ func (c *StockManagerApiController) CreateWarehouseOut() {
1098 1098
 					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
1099 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 1104
 				if items["good_type_id"] == nil || reflect.TypeOf(items["good_type_id"]).String() != "float64" {
1104 1105
 					utils.ErrorLog("good_type_id")
1105 1106
 					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
@@ -1167,16 +1168,17 @@ func (c *StockManagerApiController) CreateWarehouseOut() {
1167 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 1179
 	c.ServeSuccessJSON(map[string]interface{}{
1179 1180
 		"msg":                   "出库成功",
1181
+		"info":                  info,
1180 1182
 		"warehousing_out_order": warehousing_out_order,
1181 1183
 	})
1182 1184