|
@@ -1703,7 +1703,7 @@ func (c *HisApiController) CreateHisPrescription() {
|
1703
|
1703
|
|
1704
|
1704
|
//查找该耗材的出库记录
|
1705
|
1705
|
goodWarehouseInfo, _ := service.GetAutoRecordByGoodIdSevenEight(project_id, patient_id, recordDateTime)
|
1706
|
|
-
|
|
1706
|
+ fmt.Println("goodWarehouseInfo---------------------------------------------", goodWarehouseInfo)
|
1707
|
1707
|
if len(goodWarehouseInfo) == 0 {
|
1708
|
1708
|
//查询耗材库存
|
1709
|
1709
|
list, _ := service.GetGoodWarehouseInfoSeven(project_id)
|
|
@@ -2287,7 +2287,6 @@ func (c *HisApiController) CreateHisPrescription() {
|
2287
|
2287
|
for _, item := range hisgoodlist {
|
2288
|
2288
|
//查询耗材最后一次出库记录
|
2289
|
2289
|
wareOut, _ := service.GetLastGoodWarehouseOutInfoByProjectId(item.ProjectId, patient_id, recordDateTime, item.ID)
|
2290
|
|
- fmt.Println("hh23h232323o23o23o2o32o23o2o3o2o23o32o23o2o323o23o23o23o23o23o")
|
2291
|
2290
|
//查询默认出库仓库库存
|
2292
|
2291
|
storeConfig, _ := service.GetAllStoreHouseConfig(adminInfo.CurrentOrgId)
|
2293
|
2292
|
if len(wareOut) > 0 {
|
|
@@ -2297,8 +2296,11 @@ func (c *HisApiController) CreateHisPrescription() {
|
2297
|
2296
|
service.ModifyGoodWarehouseInfo(it.GoodId, it.WarehouseInfotId, it.OrgId, it.Count)
|
2298
|
2297
|
//删除出库记录
|
2299
|
2298
|
service.DeleteGoodWarehouseOutInfo(it.GoodId, it.SysRecordTime, it.OrgId, it.ProjectId)
|
|
2299
|
+ fmt.Println("it23------------------------------------------------", it.GoodId)
|
|
2300
|
+ fmt.Println("it.Count------------------------------------------------", it.Count)
|
2300
|
2301
|
//出库数量减少
|
2301
|
|
- service.UpdateSumCount(it.OrgId, storeConfig.StorehouseOutInfo, it.ProjectId, it.Count)
|
|
2302
|
+ service.UpdateSumCount(it.OrgId, storeConfig.StorehouseOutInfo, it.GoodId, it.Count)
|
|
2303
|
+ service.UpdateActSumCount(it.OrgId, storeConfig.StorehouseOutInfo, it.GoodId, it.Count)
|
2302
|
2304
|
}
|
2303
|
2305
|
}
|
2304
|
2306
|
|
|
@@ -2374,6 +2376,23 @@ func (c *HisApiController) CreateHisPrescription() {
|
2374
|
2376
|
service.UpdateGoodSumCountSeven(sum_count, item.ProjectId, adminInfo.CurrentOrgId)
|
2375
|
2377
|
}
|
2376
|
2378
|
|
|
2379
|
+ if goodinfo.IsUser == 1 && goodinfo.IsWarehouse == 1 {
|
|
2380
|
+ service.ConsumablePrescriptionDelivery(adminInfo.CurrentOrgId, item.PatientId, item.RecordDate, &dialyPrepareOne, &lastOut, creater, parseIntCount)
|
|
2381
|
+
|
|
2382
|
+ //查询剩余库存
|
|
2383
|
+ goodList, _ := service.GetAllGoodSumCount(item.ProjectId, adminInfo.CurrentOrgId, houseConfig.StorehouseOutInfo)
|
|
2384
|
+ var sum_count int64
|
|
2385
|
+ for _, item := range goodList {
|
|
2386
|
+ sum_count += item.StockCount
|
|
2387
|
+ }
|
|
2388
|
+
|
|
2389
|
+ //更新剩余库存
|
|
2390
|
+ service.UpdateGoodFlushCount(houseConfig.StorehouseOutInfo, item.ProjectId, adminInfo.CurrentOrgId, sum_count)
|
|
2391
|
+
|
|
2392
|
+ //耗材
|
|
2393
|
+ service.UpdateGoodSumCountSeven(sum_count, item.ProjectId, adminInfo.CurrentOrgId)
|
|
2394
|
+ }
|
|
2395
|
+
|
2377
|
2396
|
}
|
2378
|
2397
|
}
|
2379
|
2398
|
}
|
|
@@ -2945,75 +2964,6 @@ func (c *HisApiController) DeletePrescription() {
|
2945
|
2964
|
|
2946
|
2965
|
//更新基础库库存
|
2947
|
2966
|
service.UpdateGoodInfoSumCountSix(item.ProjectId, flush_count, c.GetAdminUserInfo().CurrentOrgId)
|
2948
|
|
- //查询今日该耗材退库数量
|
2949
|
|
- //cancelInfoOne, _ := service.GetCancelStockInfoByPatientId(info.PatientId, item.ProjectId, info.SysRecordTime)
|
2950
|
|
- //var cancel_Count int64
|
2951
|
|
- //for _, items := range cancelInfoOne {
|
2952
|
|
- // cancel_Count += items.Count
|
2953
|
|
- //}
|
2954
|
|
- //
|
2955
|
|
- //cha_count = total_count - cancel_Count
|
2956
|
|
- //
|
2957
|
|
- //if total_count > cancel_Count {
|
2958
|
|
- //
|
2959
|
|
- // out, err := service.FindStockOutByIsSys(c.GetAdminUserInfo().CurrentOrgId, 1, info.SysRecordTime)
|
2960
|
|
- // if err == gorm.ErrRecordNotFound {
|
2961
|
|
- // //没有记录,则创建出库单
|
2962
|
|
- // timeStr := time.Now().Format("2006-01-02")
|
2963
|
|
- // timeArr := strings.Split(timeStr, "-")
|
2964
|
|
- // total, _ := service.FindAllWarehouseOut(c.GetAdminUserInfo().CurrentOrgId)
|
2965
|
|
- // total = total + 1
|
2966
|
|
- // warehousing_out_order := strconv.FormatInt(c.GetAdminUserInfo().CurrentOrgId, 10) + timeArr[0] + timeArr[1] + timeArr[2] + "000"
|
2967
|
|
- // number, _ := strconv.ParseInt(warehousing_out_order, 10, 64)
|
2968
|
|
- // number = number + total
|
2969
|
|
- // warehousing_out_order = "CKD" + strconv.FormatInt(number, 10)
|
2970
|
|
- // warehouseOut := models.WarehouseOut{
|
2971
|
|
- // WarehouseOutOrderNumber: warehousing_out_order,
|
2972
|
|
- // OperationTime: time.Now().Unix(),
|
2973
|
|
- // OrgId: c.GetAdminUserInfo().CurrentOrgId,
|
2974
|
|
- // Creater: creater,
|
2975
|
|
- // Ctime: time.Now().Unix(),
|
2976
|
|
- // Status: 1,
|
2977
|
|
- // WarehouseOutTime: info.SysRecordTime,
|
2978
|
|
- // Dealer: 0,
|
2979
|
|
- // Manufacturer: 0,
|
2980
|
|
- // Type: 1,
|
2981
|
|
- // IsSys: 1,
|
2982
|
|
- // StorehouseId: houseConfig.StorehouseOutInfo,
|
2983
|
|
- // IsCheck: 1,
|
2984
|
|
- // }
|
2985
|
|
- // err := service.AddSigleWarehouseOut(&warehouseOut)
|
2986
|
|
- // if err != nil {
|
2987
|
|
- // utils.TraceLog("创建出库单失败 err = %v", err)
|
2988
|
|
- // return
|
2989
|
|
- // }
|
2990
|
|
- // prepare := &models.DialysisBeforePrepare{
|
2991
|
|
- // UserOrgId: c.GetAdminUserInfo().CurrentOrgId,
|
2992
|
|
- // PatientId: info.PatientId,
|
2993
|
|
- // RecordDate: info.SysRecordTime,
|
2994
|
|
- // GoodId: item.ProjectId,
|
2995
|
|
- // GoodTypeId: info.GoodTypeId,
|
2996
|
|
- // Count: cha_count,
|
2997
|
|
- // StorehouseId: houseConfig.StorehouseOutInfo,
|
2998
|
|
- // }
|
2999
|
|
- // //出库
|
3000
|
|
- // service.ConsumablesDelivery(c.GetAdminUserInfo().CurrentOrgId, info.PatientId, info.SysRecordTime, prepare, &warehouseOut, cha_count)
|
3001
|
|
- // } else if err == nil {
|
3002
|
|
- //
|
3003
|
|
- // prepare := &models.DialysisBeforePrepare{
|
3004
|
|
- // UserOrgId: c.GetAdminUserInfo().CurrentOrgId,
|
3005
|
|
- // PatientId: info.PatientId,
|
3006
|
|
- // RecordDate: info.SysRecordTime,
|
3007
|
|
- // GoodId: item.ProjectId,
|
3008
|
|
- // GoodTypeId: info.GoodTypeId,
|
3009
|
|
- // Count: cha_count,
|
3010
|
|
- // StorehouseId: houseConfig.StorehouseOutInfo,
|
3011
|
|
- // }
|
3012
|
|
- // //出库
|
3013
|
|
- // service.ConsumablesDelivery(c.GetAdminUserInfo().CurrentOrgId, info.PatientId, info.SysRecordTime, prepare, &out, cha_count)
|
3014
|
|
- // }
|
3015
|
|
- //
|
3016
|
|
- //}
|
3017
|
2967
|
|
3018
|
2968
|
}
|
3019
|
2969
|
|
|
@@ -3074,9 +3024,6 @@ func (c *HisApiController) DeletePrescription() {
|
3074
|
3024
|
fmt.Println("历史出库数据", info.Count)
|
3075
|
3025
|
fmt.Println("出库数量", total_count)
|
3076
|
3026
|
if info.ID > 0 {
|
3077
|
|
-
|
3078
|
|
- //回退库存
|
3079
|
|
- service.UpDateWarehouseInfoByStockDelete(info.WarehouseInfotId, total_count, info.PatientId, info.SysRecordTime, item.ProjectId)
|
3080
|
3027
|
cancelStockInfo := models.CancelStockInfo{
|
3081
|
3028
|
GoodId: item.ProjectId,
|
3082
|
3029
|
CancelStockId: cancel.ID,
|
|
@@ -3107,121 +3054,106 @@ func (c *HisApiController) DeletePrescription() {
|
3107
|
3054
|
|
3108
|
3055
|
cancelInfo, _ := service.GetLastCancelStockInfoByGoodId(item.ProjectId)
|
3109
|
3056
|
|
3110
|
|
- flow := models.VmStockFlow{
|
3111
|
|
- WarehousingId: info.WarehouseInfotId,
|
3112
|
|
- GoodId: item.ProjectId,
|
3113
|
|
- Number: info.Number,
|
3114
|
|
- LicenseNumber: info.LicenseNumber,
|
3115
|
|
- Count: prescribingNumber,
|
3116
|
|
- UserOrgId: c.GetAdminUserInfo().CurrentOrgId,
|
3117
|
|
- PatientId: item.PatientId,
|
3118
|
|
- SystemTime: info.SysRecordTime,
|
3119
|
|
- ConsumableType: 7,
|
3120
|
|
- IsSys: 0,
|
3121
|
|
- WarehousingOrder: "",
|
3122
|
|
- WarehouseOutId: info.WarehouseOutId,
|
3123
|
|
- WarehouseOutOrderNumber: info.WarehouseOutOrderNumber,
|
3124
|
|
- IsEdit: 0,
|
3125
|
|
- CancelStockId: cancel.ID,
|
3126
|
|
- CancelOrderNumber: cancel.OrderNumber,
|
3127
|
|
- Manufacturer: manufacturer.ID,
|
3128
|
|
- Dealer: 0,
|
3129
|
|
- Creator: c.GetAdminUserInfo().CurrentOrgId,
|
3130
|
|
- UpdateCreator: 0,
|
3131
|
|
- Status: 1,
|
3132
|
|
- Ctime: time.Now().Unix(),
|
3133
|
|
- Mtime: 0,
|
3134
|
|
- Price: info.Price,
|
3135
|
|
- WarehousingDetailId: info.WarehouseInfotId,
|
3136
|
|
- WarehouseOutDetailId: info.ID,
|
3137
|
|
- CancelOutDetailId: cancelInfo.ID,
|
3138
|
|
- ProductDate: info.ProductDate,
|
3139
|
|
- ExpireDate: info.ExpiryDate,
|
3140
|
|
- StorehouseId: houseConfig.StorehouseOutInfo,
|
3141
|
|
- OverCount: flush_count,
|
|
3057
|
+ //查询出库数量
|
|
3058
|
+ list, _ := service.GetWarehouseOutInfoByProjectIdList(item.ID, c.GetAdminUserInfo().CurrentOrgId, houseConfig.StorehouseOutInfo, item.ProjectId, item.PatientId, info.SysRecordTime)
|
|
3059
|
+
|
|
3060
|
+ //出库数据 大于 退库数量
|
|
3061
|
+ if len(list) > 0 {
|
|
3062
|
+ for _, it := range list {
|
|
3063
|
+ //回退库存
|
|
3064
|
+ service.UpDateWarehouseInfoByStockDelete(it.WarehouseInfotId, it.Count, it.PatientId, it.SysRecordTime, it.ProjectId)
|
|
3065
|
+ goodList, _ := service.GetSumGoodList(c.GetAdminUserInfo().CurrentOrgId, houseConfig.StorehouseOutInfo, item.ProjectId)
|
|
3066
|
+ var flush_count_one int64
|
|
3067
|
+ for _, it := range goodList {
|
|
3068
|
+ flush_count_one += it.StockCount
|
|
3069
|
+ }
|
|
3070
|
+ //查询该批次是否有退库数据
|
|
3071
|
+ flow, _ := service.GetWarehouseStockFlow(it.WarehouseInfotId, it.GoodId, c.GetAdminUserInfo().CurrentOrgId, it.PatientId, it.SysRecordTime)
|
|
3072
|
+ creater := c.GetAdminUserInfo().AdminUser.Id
|
|
3073
|
+ if flow.ID == 0 {
|
|
3074
|
+
|
|
3075
|
+ flow := models.VmStockFlow{
|
|
3076
|
+ WarehousingId: it.WarehouseInfotId,
|
|
3077
|
+ GoodId: it.GoodId,
|
|
3078
|
+ Number: it.Number,
|
|
3079
|
+ LicenseNumber: it.LicenseNumber,
|
|
3080
|
+ Count: it.Count,
|
|
3081
|
+ UserOrgId: c.GetAdminUserInfo().CurrentOrgId,
|
|
3082
|
+ PatientId: it.PatientId,
|
|
3083
|
+ SystemTime: it.SysRecordTime,
|
|
3084
|
+ ConsumableType: 7,
|
|
3085
|
+ IsSys: 0,
|
|
3086
|
+ WarehousingOrder: "",
|
|
3087
|
+ WarehouseOutId: it.WarehouseOutId,
|
|
3088
|
+ WarehouseOutOrderNumber: it.WarehouseOutOrderNumber,
|
|
3089
|
+ IsEdit: 0,
|
|
3090
|
+ CancelStockId: cancel.ID,
|
|
3091
|
+ CancelOrderNumber: cancel.OrderNumber,
|
|
3092
|
+ Manufacturer: manufacturer.ID,
|
|
3093
|
+ Dealer: 0,
|
|
3094
|
+ Creator: creater,
|
|
3095
|
+ UpdateCreator: 0,
|
|
3096
|
+ Status: 1,
|
|
3097
|
+ Ctime: time.Now().Unix(),
|
|
3098
|
+ Mtime: 0,
|
|
3099
|
+ Price: it.Price,
|
|
3100
|
+ WarehousingDetailId: it.WarehouseInfotId,
|
|
3101
|
+ WarehouseOutDetailId: it.ID,
|
|
3102
|
+ CancelOutDetailId: cancelInfo.ID,
|
|
3103
|
+ ProductDate: it.ProductDate,
|
|
3104
|
+ ExpireDate: it.ExpiryDate,
|
|
3105
|
+ StorehouseId: houseConfig.StorehouseOutInfo,
|
|
3106
|
+ OverCount: flush_count_one,
|
|
3107
|
+ }
|
|
3108
|
+ service.CreateStockFlowOne(flow)
|
|
3109
|
+ }
|
|
3110
|
+ if flow.ID > 0 {
|
|
3111
|
+ service.AddCountFlowOne(it.WarehouseInfotId, it.GoodId, c.GetAdminUserInfo().CurrentOrgId, it.PatientId, it.Count, it.SysRecordTime, flush_count_one)
|
|
3112
|
+ }
|
|
3113
|
+ }
|
|
3114
|
+
|
3142
|
3115
|
}
|
3143
|
|
- service.CreateStockFlowOne(flow)
|
|
3116
|
+
|
|
3117
|
+ //flow := models.VmStockFlow{
|
|
3118
|
+ // WarehousingId: info.WarehouseInfotId,
|
|
3119
|
+ // GoodId: item.ProjectId,
|
|
3120
|
+ // Number: info.Number,
|
|
3121
|
+ // LicenseNumber: info.LicenseNumber,
|
|
3122
|
+ // Count: prescribingNumber,
|
|
3123
|
+ // UserOrgId: c.GetAdminUserInfo().CurrentOrgId,
|
|
3124
|
+ // PatientId: item.PatientId,
|
|
3125
|
+ // SystemTime: info.SysRecordTime,
|
|
3126
|
+ // ConsumableType: 7,
|
|
3127
|
+ // IsSys: 0,
|
|
3128
|
+ // WarehousingOrder: "",
|
|
3129
|
+ // WarehouseOutId: info.WarehouseOutId,
|
|
3130
|
+ // WarehouseOutOrderNumber: info.WarehouseOutOrderNumber,
|
|
3131
|
+ // IsEdit: 0,
|
|
3132
|
+ // CancelStockId: cancel.ID,
|
|
3133
|
+ // CancelOrderNumber: cancel.OrderNumber,
|
|
3134
|
+ // Manufacturer: manufacturer.ID,
|
|
3135
|
+ // Dealer: 0,
|
|
3136
|
+ // Creator: c.GetAdminUserInfo().CurrentOrgId,
|
|
3137
|
+ // UpdateCreator: 0,
|
|
3138
|
+ // Status: 1,
|
|
3139
|
+ // Ctime: time.Now().Unix(),
|
|
3140
|
+ // Mtime: 0,
|
|
3141
|
+ // Price: info.Price,
|
|
3142
|
+ // WarehousingDetailId: info.WarehouseInfotId,
|
|
3143
|
+ // WarehouseOutDetailId: info.ID,
|
|
3144
|
+ // CancelOutDetailId: cancelInfo.ID,
|
|
3145
|
+ // ProductDate: info.ProductDate,
|
|
3146
|
+ // ExpireDate: info.ExpiryDate,
|
|
3147
|
+ // StorehouseId: houseConfig.StorehouseOutInfo,
|
|
3148
|
+ // OverCount: flush_count,
|
|
3149
|
+ //}
|
|
3150
|
+ //service.CreateStockFlowOne(flow)
|
3144
|
3151
|
|
3145
|
3152
|
//退库数量增加
|
3146
|
3153
|
service.UpdateSumAddCancelCount(c.GetAdminUserInfo().CurrentOrgId, item.ProjectId, houseConfig.StorehouseOutInfo, total_count)
|
3147
|
3154
|
//出库数量减少
|
3148
|
3155
|
service.UpdateSumCount(c.GetAdminUserInfo().CurrentOrgId, houseConfig.StorehouseOutInfo, item.ProjectId, total_count)
|
3149
|
3156
|
|
3150
|
|
- //if info.Count < total_count {
|
3151
|
|
- // //回退库存
|
3152
|
|
- // service.UpDateWarehouseInfoByStockDelete(info.WarehouseInfotId, info.Count, info.PatientId, info.SysRecordTime, item.ProjectId)
|
3153
|
|
- // cancelStockInfo := models.CancelStockInfo{
|
3154
|
|
- // GoodId: item.ProjectId,
|
3155
|
|
- // CancelStockId: cancel.ID,
|
3156
|
|
- // GoodTypeId: good.GoodTypeId,
|
3157
|
|
- // Count: info.Count,
|
3158
|
|
- // Price: info.Price,
|
3159
|
|
- // Total: 0,
|
3160
|
|
- // ProductDate: info.ProductDate,
|
3161
|
|
- // ExpiryDate: info.ExpiryDate,
|
3162
|
|
- // Ctime: time.Now().Unix(),
|
3163
|
|
- // Status: 1,
|
3164
|
|
- // OrgId: c.GetAdminUserInfo().CurrentOrgId,
|
3165
|
|
- // OrderNumber: cancel.OrderNumber,
|
3166
|
|
- // Type: 0,
|
3167
|
|
- // Dealer: deaerler.DealerName,
|
3168
|
|
- // Manufacturer: manufacturer.ManufacturerName,
|
3169
|
|
- // Number: info.Number,
|
3170
|
|
- // RegisterAccount: "",
|
3171
|
|
- // Remark: "",
|
3172
|
|
- // WarehouseInfoId: info.WarehouseInfotId,
|
3173
|
|
- // PatientId: info.PatientId,
|
3174
|
|
- // RecordDate: info.SysRecordTime,
|
3175
|
|
- // StorehouseId: houseConfig.StorehouseOutInfo,
|
3176
|
|
- // IsCheck: 1,
|
3177
|
|
- // }
|
3178
|
|
- //
|
3179
|
|
- // service.CreateCancelStockInfoOne(&cancelStockInfo)
|
3180
|
|
- //
|
3181
|
|
- // cancelInfo, _ := service.GetLastCancelStockInfoByGoodId(item.ProjectId)
|
3182
|
|
- //
|
3183
|
|
- // flow := models.VmStockFlow{
|
3184
|
|
- // WarehousingId: info.WarehouseInfotId,
|
3185
|
|
- // GoodId: item.ProjectId,
|
3186
|
|
- // Number: info.Number,
|
3187
|
|
- // LicenseNumber: info.LicenseNumber,
|
3188
|
|
- // Count: info.Count,
|
3189
|
|
- // UserOrgId: c.GetAdminUserInfo().CurrentOrgId,
|
3190
|
|
- // PatientId: item.PatientId,
|
3191
|
|
- // SystemTime: info.SysRecordTime,
|
3192
|
|
- // ConsumableType: 7,
|
3193
|
|
- // IsSys: 0,
|
3194
|
|
- // WarehousingOrder: "",
|
3195
|
|
- // WarehouseOutId: info.WarehouseOutId,
|
3196
|
|
- // WarehouseOutOrderNumber: info.WarehouseOutOrderNumber,
|
3197
|
|
- // IsEdit: 0,
|
3198
|
|
- // CancelStockId: cancel.ID,
|
3199
|
|
- // CancelOrderNumber: cancel.OrderNumber,
|
3200
|
|
- // Manufacturer: manufacturer.ID,
|
3201
|
|
- // Dealer: 0,
|
3202
|
|
- // Creator: c.GetAdminUserInfo().CurrentOrgId,
|
3203
|
|
- // UpdateCreator: 0,
|
3204
|
|
- // Status: 1,
|
3205
|
|
- // Ctime: time.Now().Unix(),
|
3206
|
|
- // Mtime: 0,
|
3207
|
|
- // Price: info.Price,
|
3208
|
|
- // WarehousingDetailId: info.WarehouseInfotId,
|
3209
|
|
- // WarehouseOutDetailId: info.ID,
|
3210
|
|
- // CancelOutDetailId: cancelInfo.ID,
|
3211
|
|
- // ProductDate: info.ProductDate,
|
3212
|
|
- // ExpireDate: info.ExpiryDate,
|
3213
|
|
- // StorehouseId: houseConfig.StorehouseOutInfo,
|
3214
|
|
- // OverCount: flush_count,
|
3215
|
|
- // }
|
3216
|
|
- // service.CreateStockFlowOne(flow)
|
3217
|
|
- //
|
3218
|
|
- // //退库数量增加
|
3219
|
|
- // service.UpdateSumAddCancelCount(c.GetAdminUserInfo().CurrentOrgId, item.ProjectId, houseConfig.StorehouseOutInfo, info.Count)
|
3220
|
|
- // //出库数量减少
|
3221
|
|
- // service.UpdateSumCount(c.GetAdminUserInfo().CurrentOrgId, houseConfig.StorehouseOutInfo, item.ProjectId, info.Count)
|
3222
|
|
- //
|
3223
|
|
- //}
|
3224
|
|
-
|
3225
|
3157
|
//查询已出库数量
|
3226
|
3158
|
dialysisInfo, _ := service.GetGoodDialysisOutInfoSix(c.GetAdminUserInfo().CurrentOrgId, info.PatientId, info.SysRecordTime, item.ProjectId)
|
3227
|
3159
|
|
|
@@ -3278,6 +3210,7 @@ func (c *HisApiController) DeletePrescription() {
|
3278
|
3210
|
}
|
3279
|
3211
|
|
3280
|
3212
|
} else {
|
|
3213
|
+
|
3281
|
3214
|
if drugOutConfig.IsOpen == 1 {
|
3282
|
3215
|
if len(advices) > 0 {
|
3283
|
3216
|
for _, item := range advices {
|
|
@@ -3285,6 +3218,13 @@ func (c *HisApiController) DeletePrescription() {
|
3285
|
3218
|
service.DrugAutoAddCancelInfo(item, creater)
|
3286
|
3219
|
}
|
3287
|
3220
|
}
|
|
3221
|
+ } else {
|
|
3222
|
+ if len(advices) > 0 {
|
|
3223
|
+ for _, item := range advices {
|
|
3224
|
+ creater := c.GetAdminUserInfo().AdminUser.Id
|
|
3225
|
+ service.DrugAutoAddCancelInfo(item, creater)
|
|
3226
|
+ }
|
|
3227
|
+ }
|
3288
|
3228
|
}
|
3289
|
3229
|
}
|
3290
|
3230
|
|
|
@@ -3474,6 +3414,7 @@ func (c *HisApiController) DeleteProject() {
|
3474
|
3414
|
}
|
3475
|
3415
|
|
3476
|
3416
|
if project.Type == 3 && project.IsOut == 1 {
|
|
3417
|
+
|
3477
|
3418
|
houseConfig, _ := service.GetAllStoreHouseConfig(c.GetAdminUserInfo().CurrentOrgId)
|
3478
|
3419
|
good, _ := service.FindGoodInfoByIdTwo(project.ProjectId)
|
3479
|
3420
|
f_count, _ := strconv.ParseFloat(project.Count, 64)
|
|
@@ -3506,7 +3447,7 @@ func (c *HisApiController) DeleteProject() {
|
3506
|
3447
|
cancel, _ := service.GetLastCancelStockById(adminInfo.CurrentOrgId)
|
3507
|
3448
|
floatPrescrip := strconv.FormatFloat(f_count, 'f', -1, 32)
|
3508
|
3449
|
prescribingNumber, _ := strconv.ParseInt(floatPrescrip, 10, 64)
|
3509
|
|
- //获取出库数据
|
|
3450
|
+ //查询是否有出库
|
3510
|
3451
|
info, _ := service.GetLastWarehoseByGoodId(project.ProjectId, project.PatientId, project.RecordDate)
|
3511
|
3452
|
|
3512
|
3453
|
manufacturer, _ := service.GetManufactureById(info.Manufacturer)
|
|
@@ -3584,12 +3525,15 @@ func (c *HisApiController) DeleteProject() {
|
3584
|
3525
|
service.UpdateSumCount(adminInfo.CurrentOrgId, houseConfig.StorehouseOutInfo, project.ProjectId, info.Count)
|
3585
|
3526
|
}
|
3586
|
3527
|
|
|
3528
|
+ //查询剩余库存
|
3587
|
3529
|
goodList, _ := service.GetSumGoodList(adminInfo.CurrentOrgId, houseConfig.StorehouseOutInfo, project.ProjectId)
|
3588
|
3530
|
var over_count int64
|
3589
|
3531
|
for _, it := range goodList {
|
3590
|
3532
|
over_count += it.StockCount
|
3591
|
3533
|
}
|
|
3534
|
+ //出库数据 大于 退库数量
|
3592
|
3535
|
if info.Count >= prescribingNumber {
|
|
3536
|
+
|
3593
|
3537
|
flow := models.VmStockFlow{
|
3594
|
3538
|
WarehousingId: info.WarehouseInfotId,
|
3595
|
3539
|
GoodId: project.ProjectId,
|
|
@@ -3626,6 +3570,7 @@ func (c *HisApiController) DeleteProject() {
|
3626
|
3570
|
service.CreateStockFlowOne(flow)
|
3627
|
3571
|
}
|
3628
|
3572
|
|
|
3573
|
+ //出库数据小于退库数据
|
3629
|
3574
|
if info.Count < prescribingNumber {
|
3630
|
3575
|
flow := models.VmStockFlow{
|
3631
|
3576
|
WarehousingId: info.WarehouseInfotId,
|
|
@@ -3679,84 +3624,6 @@ func (c *HisApiController) DeleteProject() {
|
3679
|
3624
|
//更新剩余库存
|
3680
|
3625
|
service.UpdateSumGood(adminInfo.CurrentOrgId, houseConfig.StorehouseOutInfo, project.ProjectId, over_count)
|
3681
|
3626
|
|
3682
|
|
- //查询今日该患者开了多少耗材
|
3683
|
|
- //projectList, _ := service.GetHisPrepscritionByPatientId(info.PatientId, project.ProjectId, info.SysRecordTime)
|
3684
|
|
- //
|
3685
|
|
- //var total_count int64
|
3686
|
|
- //var cha_count int64
|
3687
|
|
- //for _, item := range projectList {
|
3688
|
|
- // count, _ := strconv.ParseInt(item.Count, 10, 64)
|
3689
|
|
- // total_count += count
|
3690
|
|
- //}
|
3691
|
|
- //
|
3692
|
|
- ////查询今日该耗材退库数量
|
3693
|
|
- //cancelInfoOne, _ := service.GetCancelStockInfoByPatientId(info.PatientId, project.ProjectId, info.SysRecordTime)
|
3694
|
|
- //var cancel_count int64
|
3695
|
|
- //for _, items := range cancelInfoOne {
|
3696
|
|
- // cancel_count += items.Count
|
3697
|
|
- //}
|
3698
|
|
- //
|
3699
|
|
- //cha_count = total_count - cancel_count
|
3700
|
|
- //
|
3701
|
|
- //if total_count > cancel_count {
|
3702
|
|
- //
|
3703
|
|
- // out, err := service.FindStockOutByIsSys(adminInfo.CurrentOrgId, 1, info.SysRecordTime)
|
3704
|
|
- // if err == gorm.ErrRecordNotFound {
|
3705
|
|
- // //没有记录,则创建出库单
|
3706
|
|
- // timeStr := time.Now().Format("2006-01-02")
|
3707
|
|
- // timeArr := strings.Split(timeStr, "-")
|
3708
|
|
- // total, _ := service.FindAllWarehouseOut(adminInfo.CurrentOrgId)
|
3709
|
|
- // total = total + 1
|
3710
|
|
- // warehousing_out_order := strconv.FormatInt(adminInfo.CurrentOrgId, 10) + timeArr[0] + timeArr[1] + timeArr[2] + "000"
|
3711
|
|
- // number, _ := strconv.ParseInt(warehousing_out_order, 10, 64)
|
3712
|
|
- // number = number + total
|
3713
|
|
- // warehousing_out_order = "CKD" + strconv.FormatInt(number, 10)
|
3714
|
|
- // warehouseOut := models.WarehouseOut{
|
3715
|
|
- // WarehouseOutOrderNumber: warehousing_out_order,
|
3716
|
|
- // OperationTime: time.Now().Unix(),
|
3717
|
|
- // OrgId: adminInfo.CurrentOrgId,
|
3718
|
|
- // Creater: creater,
|
3719
|
|
- // Ctime: time.Now().Unix(),
|
3720
|
|
- // Status: 1,
|
3721
|
|
- // WarehouseOutTime: info.SysRecordTime,
|
3722
|
|
- // Dealer: 0,
|
3723
|
|
- // Manufacturer: 0,
|
3724
|
|
- // Type: 1,
|
3725
|
|
- // IsSys: 1,
|
3726
|
|
- // StorehouseId: houseConfig.StorehouseOutInfo,
|
3727
|
|
- // }
|
3728
|
|
- // err := service.AddSigleWarehouseOut(&warehouseOut)
|
3729
|
|
- // if err != nil {
|
3730
|
|
- // utils.TraceLog("创建出库单失败 err = %v", err)
|
3731
|
|
- // return
|
3732
|
|
- // }
|
3733
|
|
- // prepare := &models.DialysisBeforePrepare{
|
3734
|
|
- // UserOrgId: adminInfo.CurrentOrgId,
|
3735
|
|
- // PatientId: info.PatientId,
|
3736
|
|
- // RecordDate: info.SysRecordTime,
|
3737
|
|
- // GoodId: project.ProjectId,
|
3738
|
|
- // GoodTypeId: info.GoodTypeId,
|
3739
|
|
- // Count: cha_count,
|
3740
|
|
- // StorehouseId: houseConfig.StorehouseOutInfo,
|
3741
|
|
- // }
|
3742
|
|
- // //出库
|
3743
|
|
- // service.ConsumablesDelivery(adminInfo.CurrentOrgId, info.PatientId, info.SysRecordTime, prepare, &warehouseOut, cha_count)
|
3744
|
|
- // } else if err == nil {
|
3745
|
|
- // prepare := &models.DialysisBeforePrepare{
|
3746
|
|
- // UserOrgId: adminInfo.CurrentOrgId,
|
3747
|
|
- // PatientId: info.PatientId,
|
3748
|
|
- // RecordDate: info.SysRecordTime,
|
3749
|
|
- // GoodId: project.ProjectId,
|
3750
|
|
- // GoodTypeId: info.GoodTypeId,
|
3751
|
|
- // Count: cha_count,
|
3752
|
|
- // StorehouseId: houseConfig.StorehouseOutInfo,
|
3753
|
|
- // }
|
3754
|
|
- // //出库
|
3755
|
|
- // service.ConsumablesDelivery(adminInfo.CurrentOrgId, info.PatientId, info.SysRecordTime, prepare, &out, cha_count)
|
3756
|
|
- // }
|
3757
|
|
- //
|
3758
|
|
- //}
|
3759
|
|
-
|
3760
|
3627
|
stockList, _ := service.GetStockCountByGoodId(project.ProjectId, houseConfig.StorehouseOutInfo, project.UserOrgId)
|
3761
|
3628
|
var total_count_one int64
|
3762
|
3629
|
for _, it := range stockList {
|
|
@@ -3798,11 +3665,13 @@ func (c *HisApiController) DeleteProject() {
|
3798
|
3665
|
}
|
3799
|
3666
|
}
|
3800
|
3667
|
|
|
3668
|
+ //保存处方出库
|
3801
|
3669
|
if goodOutConfig.IsOpen == 1 {
|
3802
|
3670
|
|
3803
|
3671
|
if project.Type == 3 {
|
3804
|
3672
|
houseConfig, _ := service.GetAllStoreHouseConfig(c.GetAdminUserInfo().CurrentOrgId)
|
3805
|
3673
|
good, _ := service.FindGoodInfoByIdTwo(project.ProjectId)
|
|
3674
|
+
|
3806
|
3675
|
f_count, _ := strconv.ParseFloat(project.Count, 64)
|
3807
|
3676
|
|
3808
|
3677
|
operation_time := time.Now().Unix()
|
|
@@ -3868,19 +3737,18 @@ func (c *HisApiController) DeleteProject() {
|
3868
|
3737
|
}
|
3869
|
3738
|
|
3870
|
3739
|
service.CreateCancelStockInfoOne(&cancelStockInfo)
|
3871
|
|
- //回退库存
|
3872
|
|
- service.UpDateWarehouseInfoByStockDelete(info.WarehouseInfotId, prescribingNumber, info.PatientId, info.SysRecordTime, project.ProjectId)
|
|
3740
|
+
|
3873
|
3741
|
//退库数量增加
|
3874
|
|
- service.UpdateSumAddCancelCount(adminInfo.CurrentOrgId, project.ProjectId, houseConfig.StorehouseOutInfo, prescribingNumber)
|
|
3742
|
+ //service.UpdateSumAddCancelCount(adminInfo.CurrentOrgId, project.ProjectId, houseConfig.StorehouseOutInfo, prescribingNumber)
|
3875
|
3743
|
//出库数量减少
|
3876
|
|
- service.UpdateSumCount(adminInfo.CurrentOrgId, houseConfig.StorehouseOutInfo, project.ProjectId, prescribingNumber)
|
|
3744
|
+ //service.UpdateSumCount(adminInfo.CurrentOrgId, houseConfig.StorehouseOutInfo, project.ProjectId, prescribingNumber)
|
3877
|
3745
|
}
|
3878
|
3746
|
if info.Count < prescribingNumber {
|
3879
|
3747
|
cancelStockInfo := models.CancelStockInfo{
|
3880
|
3748
|
GoodId: project.ProjectId,
|
3881
|
3749
|
CancelStockId: cancel.ID,
|
3882
|
3750
|
GoodTypeId: good.GoodTypeId,
|
3883
|
|
- Count: info.Count,
|
|
3751
|
+ Count: prescribingNumber,
|
3884
|
3752
|
Price: info.Price,
|
3885
|
3753
|
Total: 0,
|
3886
|
3754
|
ProductDate: info.ProductDate,
|
|
@@ -3904,11 +3772,8 @@ func (c *HisApiController) DeleteProject() {
|
3904
|
3772
|
|
3905
|
3773
|
service.CreateCancelStockInfoOne(&cancelStockInfo)
|
3906
|
3774
|
//回退库存
|
3907
|
|
- service.UpDateWarehouseInfoByStockDelete(info.WarehouseInfotId, info.Count, info.PatientId, info.SysRecordTime, project.ProjectId)
|
3908
|
|
- //退库数量增加
|
3909
|
|
- service.UpdateSumAddCancelCount(adminInfo.CurrentOrgId, project.ProjectId, houseConfig.StorehouseOutInfo, info.Count)
|
3910
|
|
- //出库数量减少
|
3911
|
|
- service.UpdateSumCount(adminInfo.CurrentOrgId, houseConfig.StorehouseOutInfo, project.ProjectId, info.Count)
|
|
3775
|
+ //service.UpDateWarehouseInfoByStockDelete(info.WarehouseInfotId, info.Count, info.PatientId, info.SysRecordTime, project.ProjectId)
|
|
3776
|
+
|
3912
|
3777
|
}
|
3913
|
3778
|
|
3914
|
3779
|
goodList, _ := service.GetSumGoodList(adminInfo.CurrentOrgId, houseConfig.StorehouseOutInfo, project.ProjectId)
|
|
@@ -3916,78 +3781,68 @@ func (c *HisApiController) DeleteProject() {
|
3916
|
3781
|
for _, it := range goodList {
|
3917
|
3782
|
over_count += it.StockCount
|
3918
|
3783
|
}
|
3919
|
|
- if info.Count >= prescribingNumber {
|
3920
|
|
- flow := models.VmStockFlow{
|
3921
|
|
- WarehousingId: info.WarehouseInfotId,
|
3922
|
|
- GoodId: project.ProjectId,
|
3923
|
|
- Number: info.Number,
|
3924
|
|
- LicenseNumber: info.LicenseNumber,
|
3925
|
|
- Count: prescribingNumber,
|
3926
|
|
- UserOrgId: adminInfo.CurrentOrgId,
|
3927
|
|
- PatientId: project.PatientId,
|
3928
|
|
- SystemTime: info.SysRecordTime,
|
3929
|
|
- ConsumableType: 7,
|
3930
|
|
- IsSys: 0,
|
3931
|
|
- WarehousingOrder: "",
|
3932
|
|
- WarehouseOutId: info.WarehouseOutId,
|
3933
|
|
- WarehouseOutOrderNumber: info.WarehouseOutOrderNumber,
|
3934
|
|
- IsEdit: 0,
|
3935
|
|
- CancelStockId: cancel.ID,
|
3936
|
|
- CancelOrderNumber: cancel.OrderNumber,
|
3937
|
|
- Manufacturer: manufacturer.ID,
|
3938
|
|
- Dealer: 0,
|
3939
|
|
- Creator: adminInfo.AdminUser.Id,
|
3940
|
|
- UpdateCreator: 0,
|
3941
|
|
- Status: 1,
|
3942
|
|
- Ctime: time.Now().Unix(),
|
3943
|
|
- Mtime: 0,
|
3944
|
|
- Price: info.Price,
|
3945
|
|
- WarehousingDetailId: info.WarehouseInfotId,
|
3946
|
|
- WarehouseOutDetailId: info.ID,
|
3947
|
|
- CancelOutDetailId: cancelInfo.ID,
|
3948
|
|
- ProductDate: info.ProductDate,
|
3949
|
|
- ExpireDate: info.ExpiryDate,
|
3950
|
|
- StorehouseId: houseConfig.StorehouseOutInfo,
|
3951
|
|
- OverCount: over_count,
|
3952
|
|
- }
|
3953
|
|
- service.CreateStockFlowOne(flow)
|
3954
|
|
- }
|
3955
|
3784
|
|
3956
|
|
- if info.Count < prescribingNumber {
|
3957
|
|
- flow := models.VmStockFlow{
|
3958
|
|
- WarehousingId: info.WarehouseInfotId,
|
3959
|
|
- GoodId: project.ProjectId,
|
3960
|
|
- Number: info.Number,
|
3961
|
|
- LicenseNumber: info.LicenseNumber,
|
3962
|
|
- Count: info.Count,
|
3963
|
|
- UserOrgId: adminInfo.CurrentOrgId,
|
3964
|
|
- PatientId: project.PatientId,
|
3965
|
|
- SystemTime: info.SysRecordTime,
|
3966
|
|
- ConsumableType: 7,
|
3967
|
|
- IsSys: 0,
|
3968
|
|
- WarehousingOrder: "",
|
3969
|
|
- WarehouseOutId: info.WarehouseOutId,
|
3970
|
|
- WarehouseOutOrderNumber: info.WarehouseOutOrderNumber,
|
3971
|
|
- IsEdit: 0,
|
3972
|
|
- CancelStockId: cancel.ID,
|
3973
|
|
- CancelOrderNumber: cancel.OrderNumber,
|
3974
|
|
- Manufacturer: manufacturer.ID,
|
3975
|
|
- Dealer: 0,
|
3976
|
|
- Creator: adminInfo.AdminUser.Id,
|
3977
|
|
- UpdateCreator: 0,
|
3978
|
|
- Status: 1,
|
3979
|
|
- Ctime: time.Now().Unix(),
|
3980
|
|
- Mtime: 0,
|
3981
|
|
- Price: info.Price,
|
3982
|
|
- WarehousingDetailId: info.WarehouseInfotId,
|
3983
|
|
- WarehouseOutDetailId: info.ID,
|
3984
|
|
- CancelOutDetailId: cancelInfo.ID,
|
3985
|
|
- ProductDate: info.ProductDate,
|
3986
|
|
- ExpireDate: info.ExpiryDate,
|
3987
|
|
- StorehouseId: houseConfig.StorehouseOutInfo,
|
3988
|
|
- OverCount: over_count,
|
|
3785
|
+ //查询出库数量
|
|
3786
|
+ list, _ := service.GetWarehouseOutInfoByProjectIdList(id, adminInfo.CurrentOrgId, houseConfig.StorehouseOutInfo, project.ProjectId, project.PatientId, info.SysRecordTime)
|
|
3787
|
+
|
|
3788
|
+ //出库数据 大于 退库数量
|
|
3789
|
+ if len(list) > 0 {
|
|
3790
|
+ for _, it := range list {
|
|
3791
|
+ //回退库存
|
|
3792
|
+ service.UpDateWarehouseInfoByStockDelete(it.WarehouseInfotId, it.Count, it.PatientId, it.SysRecordTime, it.ProjectId)
|
|
3793
|
+ //退库数量增加
|
|
3794
|
+ service.UpdateSumAddCancelCount(adminInfo.CurrentOrgId, project.ProjectId, houseConfig.StorehouseOutInfo, it.Count)
|
|
3795
|
+ //出库数量减少
|
|
3796
|
+ service.UpdateSumCount(adminInfo.CurrentOrgId, houseConfig.StorehouseOutInfo, project.ProjectId, it.Count)
|
|
3797
|
+ goodList, _ := service.GetSumGoodList(adminInfo.CurrentOrgId, houseConfig.StorehouseOutInfo, project.ProjectId)
|
|
3798
|
+ var over_count_one int64
|
|
3799
|
+ for _, it := range goodList {
|
|
3800
|
+ over_count_one += it.StockCount
|
|
3801
|
+ }
|
|
3802
|
+ //查询该批次是否有退库数据
|
|
3803
|
+ flow, _ := service.GetWarehouseStockFlow(it.WarehouseInfotId, it.GoodId, adminInfo.CurrentOrgId, it.PatientId, it.SysRecordTime)
|
|
3804
|
+
|
|
3805
|
+ if flow.ID == 0 {
|
|
3806
|
+ flow := models.VmStockFlow{
|
|
3807
|
+ WarehousingId: it.WarehouseInfotId,
|
|
3808
|
+ GoodId: it.GoodId,
|
|
3809
|
+ Number: it.Number,
|
|
3810
|
+ LicenseNumber: it.LicenseNumber,
|
|
3811
|
+ Count: it.Count,
|
|
3812
|
+ UserOrgId: adminInfo.CurrentOrgId,
|
|
3813
|
+ PatientId: it.PatientId,
|
|
3814
|
+ SystemTime: it.SysRecordTime,
|
|
3815
|
+ ConsumableType: 7,
|
|
3816
|
+ IsSys: 0,
|
|
3817
|
+ WarehousingOrder: "",
|
|
3818
|
+ WarehouseOutId: it.WarehouseOutId,
|
|
3819
|
+ WarehouseOutOrderNumber: it.WarehouseOutOrderNumber,
|
|
3820
|
+ IsEdit: 0,
|
|
3821
|
+ CancelStockId: cancel.ID,
|
|
3822
|
+ CancelOrderNumber: cancel.OrderNumber,
|
|
3823
|
+ Manufacturer: manufacturer.ID,
|
|
3824
|
+ Dealer: 0,
|
|
3825
|
+ Creator: adminInfo.AdminUser.Id,
|
|
3826
|
+ UpdateCreator: 0,
|
|
3827
|
+ Status: 1,
|
|
3828
|
+ Ctime: time.Now().Unix(),
|
|
3829
|
+ Mtime: 0,
|
|
3830
|
+ Price: it.Price,
|
|
3831
|
+ WarehousingDetailId: it.WarehouseInfotId,
|
|
3832
|
+ WarehouseOutDetailId: it.ID,
|
|
3833
|
+ CancelOutDetailId: cancelInfo.ID,
|
|
3834
|
+ ProductDate: it.ProductDate,
|
|
3835
|
+ ExpireDate: it.ExpiryDate,
|
|
3836
|
+ StorehouseId: houseConfig.StorehouseOutInfo,
|
|
3837
|
+ OverCount: over_count_one,
|
|
3838
|
+ }
|
|
3839
|
+ service.CreateStockFlowOne(flow)
|
|
3840
|
+ }
|
|
3841
|
+ if flow.ID > 0 {
|
|
3842
|
+ service.AddCountFlowOne(it.WarehouseInfotId, it.GoodId, adminInfo.CurrentOrgId, it.PatientId, it.Count, it.SysRecordTime, over_count_one)
|
|
3843
|
+ }
|
3989
|
3844
|
}
|
3990
|
|
- service.CreateStockFlowOne(flow)
|
|
3845
|
+
|
3991
|
3846
|
}
|
3992
|
3847
|
|
3993
|
3848
|
//查询已出库数量
|
|
@@ -6301,6 +6156,7 @@ func (c *HisApiController) GetUploadInfo() {
|
6301
|
6156
|
service.UpdateBaseDrugSumTwo(item.DrugId, sum_count, item.UserOrgId)
|
6302
|
6157
|
service.UpdateDrugStockCount(item.DrugId, item.UserOrgId, storeHouseConfig.DrugStorehouseOut, sum_count)
|
6303
|
6158
|
}
|
|
6159
|
+
|
6304
|
6160
|
}
|
6305
|
6161
|
orgId := c.GetAdminUserInfo().CurrentOrgId
|
6306
|
6162
|
|
|
@@ -6374,6 +6230,20 @@ func (c *HisApiController) GetUploadInfo() {
|
6374
|
6230
|
service.UpdateGoodSumCountSeven(sum_count, item.GoodId, adminUser.CurrentOrgId)
|
6375
|
6231
|
}
|
6376
|
6232
|
|
|
6233
|
+ if goodInfo.IsUser == 1 && goodInfo.IsWarehouse == 1 {
|
|
6234
|
+ service.ConsumableSettleDelivery(adminUser.CurrentOrgId, his.PatientId, his.RecordDate, &dialyPrepareOne, &lastOut, adminUser.AdminUser.Id, order.ID)
|
|
6235
|
+ //查询剩余库存
|
|
6236
|
+ goodList, _ := service.GetAllGoodSumCount(item.GoodId, adminUser.CurrentOrgId, houseConfig.StorehouseOutInfo)
|
|
6237
|
+ var sum_count int64
|
|
6238
|
+ for _, item := range goodList {
|
|
6239
|
+ sum_count += item.StockCount
|
|
6240
|
+ }
|
|
6241
|
+ service.UpdateGoodFlushCount(houseConfig.StorehouseOutInfo, item.GoodId, adminUser.CurrentOrgId, sum_count)
|
|
6242
|
+
|
|
6243
|
+ //耗材
|
|
6244
|
+ service.UpdateGoodSumCountSeven(sum_count, item.GoodId, adminUser.CurrentOrgId)
|
|
6245
|
+ }
|
|
6246
|
+
|
6377
|
6247
|
}
|
6378
|
6248
|
}
|
6379
|
6249
|
|