Browse Source

耗材参数

XMLWAN 3 years ago
parent
commit
690c27bc8e

+ 2 - 2
controllers/mobile_api_controllers/dialysis_api_controller.go View File

@@ -3379,7 +3379,7 @@ func (c *DialysisAPIController) CreateConsumables() {
3379 3379
 		if len(beforePrepares) > 0 && active == 2 {
3380 3380
 
3381 3381
 			//出库
3382
-			err = service.ConsumablesDeliveryTotal(adminUser.Org.Id, patient_id, record_time, beforePrepares, newBeforePrepares)
3382
+			err = service.ConsumablesDeliveryTotal(adminUser.Org.Id, patient_id, record_time, beforePrepares, newBeforePrepares, adminUser.AdminUser.Id)
3383 3383
 			fmt.Println("err", err)
3384 3384
 
3385 3385
 			//查询今日出库数据
@@ -4274,7 +4274,7 @@ func (c *DialysisAPIController) CreateOtherStockOutInfo() {
4274 4274
 	}
4275 4275
 
4276 4276
 	//出库逻辑
4277
-	err = service.ConsumablesDeliveryTotal(adminInfo.Org.Id, patient_id, record_time, beforePrepares, newBeforePrepares)
4277
+	err = service.ConsumablesDeliveryTotal(adminInfo.Org.Id, patient_id, record_time, beforePrepares, newBeforePrepares, adminInfo.AdminUser.Id)
4278 4278
 	if err != nil {
4279 4279
 		utils.ErrorLog(err.Error())
4280 4280
 		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)

+ 2 - 2
service/warhouse_service.go View File

@@ -673,7 +673,7 @@ func AutoDrugDeliverInfo(orgID int64, prescribingNumber int64, warehouseout *mod
673 673
 }
674 674
 
675 675
 // 耗材出库
676
-func ConsumablesDeliveryTotal(orgID int64, patient_id int64, record_time int64, goods []*models.DialysisBeforePrepareGoods, goodOne []*models.NewDialysisBeforePrepareGoods) (err error) {
676
+func ConsumablesDeliveryTotal(orgID int64, patient_id int64, record_time int64, goods []*models.DialysisBeforePrepareGoods, goodOne []*models.NewDialysisBeforePrepareGoods, creator int64) (err error) {
677 677
 
678 678
 	//查询该患者当天已经出库的耗材信息
679 679
 	goods_yc, _ := FindConsumablesByDateTwo(orgID, patient_id, record_time)
@@ -731,7 +731,7 @@ func ConsumablesDeliveryTotal(orgID int64, patient_id int64, record_time int64,
731 731
 				WarehouseOutOrderNumber: warehousing_out_order,
732 732
 				OperationTime:           time.Now().Unix(),
733 733
 				OrgId:                   orgID,
734
-				Creater:                 0,
734
+				Creater:                 creator,
735 735
 				Ctime:                   time.Now().Unix(),
736 736
 				Status:                  1,
737 737
 				WarehouseOutTime:        record_time,