|
@@ -8107,16 +8107,21 @@ func (c *DialysisAPIController) CreateOtherStockOutInfo() {
|
8107
|
8107
|
}
|
8108
|
8108
|
}
|
8109
|
8109
|
|
8110
|
|
- //出库逻辑
|
8111
|
|
- err = service.ConsumablesDeliveryTotal(adminInfo.Org.Id, patient_id, record_time, beforePrepares, newBeforePrepares, adminInfo.AdminUser.Id)
|
8112
|
|
-
|
8113
|
|
- if err != nil {
|
8114
|
|
- utils.ErrorLog(err.Error())
|
8115
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
8116
|
|
- return
|
8117
|
|
-
|
|
8110
|
+ for _, item := range beforePrepares {
|
|
8111
|
+ //查询该耗材今日出库了多少
|
|
8112
|
+ service.GetHistoryWarehouseOutInfo(item.PatientId, adminInfo.Org.Id, record_time)
|
8118
|
8113
|
}
|
8119
|
8114
|
|
|
8115
|
+ ////出库逻辑
|
|
8116
|
+ //err = service.ConsumablesDeliveryTotal(adminInfo.Org.Id, patient_id, record_time, beforePrepares, newBeforePrepares, adminInfo.AdminUser.Id)
|
|
8117
|
+ //
|
|
8118
|
+ //if err != nil {
|
|
8119
|
+ // utils.ErrorLog(err.Error())
|
|
8120
|
+ // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
|
8121
|
+ // return
|
|
8122
|
+ //
|
|
8123
|
+ //}
|
|
8124
|
+
|
8120
|
8125
|
finish := models.XtDialysisFinish{
|
8121
|
8126
|
IsFinish: 1,
|
8122
|
8127
|
UserOrgId: adminInfo.Org.Id,
|