|
@@ -5212,38 +5212,6 @@ func (c *HisApiController) GetSettleAccounts() {
|
5212
|
5212
|
his, _ := service.GetHisPatientByNumber(order.MdtrtId)
|
5213
|
5213
|
orderInfos, _ := service.GetHisOrderInfoByNumber(order.Number)
|
5214
|
5214
|
orderInfos_two, _ := service.GetHisOrderInfoByNumberTwo(order.Number)
|
5215
|
|
- orderInfos_three, _ := service.GetHisOrderInfoByNumberThree(order.Number)
|
5216
|
|
-
|
5217
|
|
- var orderInfos_four []*models.HisOrderInfo
|
5218
|
|
- for _, item := range orderInfos_three {
|
5219
|
|
- if item.HisPrescriptionProject.HisProject.CostClassify == 3 {
|
5220
|
|
- item.HisPrescriptionProject.IsCheckTeam = 1
|
5221
|
|
- orderInfos_four = append(orderInfos_four, item)
|
5222
|
|
-
|
5223
|
|
- }
|
5224
|
|
- if item.HisPrescriptionProject.HisProject.CostClassify != 3 {
|
5225
|
|
- item.HisPrescriptionProject.IsCheckTeam = 2
|
5226
|
|
- orderInfos_two = append(orderInfos_two, item)
|
5227
|
|
- }
|
5228
|
|
- }
|
5229
|
|
-
|
5230
|
|
- new_order_info := RemoveRepeatedTeam(orderInfos_four)
|
5231
|
|
- var cus_slice []CustomOrderInfo
|
5232
|
|
- for _, item := range new_order_info {
|
5233
|
|
- var cus CustomOrderInfo
|
5234
|
|
- cus.Name = item.HisPrescriptionProject.XtHisProjectTeam.ProjectTeam
|
5235
|
|
- cus.Unit = ""
|
5236
|
|
- cus.Spec = ""
|
5237
|
|
- for _, subItem := range orderInfos_four {
|
5238
|
|
- if item.HisPrescriptionProject.TeamId == subItem.HisPrescriptionProject.TeamId {
|
5239
|
|
- cus.Count = cus.Count + subItem.Cnt
|
5240
|
|
- cus.Price = cus.Price + subItem.Pric
|
5241
|
|
- cus.Total = cus.Total + (cus.Price * cus.Count)
|
5242
|
|
- }
|
5243
|
|
- }
|
5244
|
|
- cus_slice = append(cus_slice, cus)
|
5245
|
|
- }
|
5246
|
|
-
|
5247
|
5215
|
orderInfos = append(orderInfos, orderInfos_two...)
|
5248
|
5216
|
//diagnosisConfig, _ := service.FindDiagnoseById(his.Diagnosis)
|
5249
|
5217
|
|