Parcourir la source

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

XMLWAN il y a 3 ans
Parent
révision
ce0d79247d

+ 9 - 3
controllers/his_api_controller.go Voir le fichier

@@ -3189,13 +3189,15 @@ func (c *HisApiController) GetUploadInfo() {
3189 3189
 	if tempOrder.ID == 0 {
3190 3190
 		if settle_accounts_type == 1 { //日结
3191 3191
 			fmt.Println(reg_type)
3192
-			if reg_type == 11 {
3193
-				fmt.Println(reg_type)
3192
+
3193
+			if reg_type == 11 || reg_type == 1111 || reg_type == 1112 {
3194
+
3194 3195
 				prescriptions, _ = service.GetPrescriptionByIds(ids_arr, adminUser.CurrentOrgId)
3195 3196
 			} else {
3196 3197
 				prescriptions, _ = service.GetSettleHisPrescription(adminUser.CurrentOrgId, id, his_patient_id, recordDateTime, reg_type)
3197 3198
 			}
3198 3199
 		} else { //月结
3200
+
3199 3201
 			start_time_str := c.GetString("start_time")
3200 3202
 			end_time_str := c.GetString("end_time")
3201 3203
 			timeLayout := "2006-01-02"
@@ -3249,6 +3251,10 @@ func (c *HisApiController) GetUploadInfo() {
3249 3251
 			}
3250 3252
 		}
3251 3253
 
3254
+		if reg_type == 1111 || reg_type == 1112 {
3255
+			reg_type = 11
3256
+		}
3257
+
3252 3258
 		allTotal := fmt.Sprintf("%.4f", total)
3253 3259
 		totals, _ := strconv.ParseFloat(allTotal, 64)
3254 3260
 		order := &models.HisOrder{
@@ -5014,7 +5020,7 @@ func (c *HisApiController) PreSettle() {
5014 5020
 
5015 5021
 	if settle_accounts_type == 1 { //日结
5016 5022
 
5017
-		if reg_type == 11 {
5023
+		if reg_type == 11 || reg_type == 1111 || reg_type == 1112 {
5018 5024
 
5019 5025
 			prescriptions, _ = service.GetPrescriptionByIds(ids_arr, adminUser.CurrentOrgId)
5020 5026
 		} else {

+ 5 - 0
controllers/manager_center_api_controller.go Voir le fichier

@@ -1440,6 +1440,8 @@ func (c *ManagerCenterApiController) GetAllManufacturer() {
1440 1440
 func (c *ManagerCenterApiController) CreateGoodInfo() {
1441 1441
 	good_id, _ := c.GetInt64("good_id", 0)
1442 1442
 	specification_name := c.GetString("specification_name")
1443
+	register_number := c.GetString("register_number")
1444
+
1443 1445
 	good_unit, _ := c.GetInt64("good_unit", -1)
1444 1446
 	buy_price, _ := c.GetFloat("buy_price", 0)
1445 1447
 	sell_price, _ := c.GetFloat("sell_price", 0)
@@ -1540,6 +1542,7 @@ func (c *ManagerCenterApiController) CreateGoodInfo() {
1540 1542
 		PackingPrice:                packing_price,
1541 1543
 		DefaultCountUnit:            default_count_unit,
1542 1544
 		MinUnit:                     min_unit,
1545
+		RegisterNumber:              register_number,
1543 1546
 	}
1544 1547
 	err, goodInfos := service.AddSigleGoodInfo(&goodInfo)
1545 1548
 	if err == nil {
@@ -1601,6 +1604,7 @@ func (c *ManagerCenterApiController) ModifyGoodInfo() {
1601 1604
 	default_count_unit := c.GetString("default_count_unit")
1602 1605
 	min_unit := c.GetString("min_unit")
1603 1606
 	total, _ := c.GetFloat("total")
1607
+	register_number := c.GetString("register_number")
1604 1608
 
1605 1609
 	adminUserInfo := c.GetAdminUserInfo()
1606 1610
 
@@ -1652,6 +1656,7 @@ func (c *ManagerCenterApiController) ModifyGoodInfo() {
1652 1656
 		DefaultCountUnit:            default_count_unit,
1653 1657
 		MinUnit:                     min_unit,
1654 1658
 		Total:                       total,
1659
+		RegisterNumber:              register_number,
1655 1660
 	}
1656 1661
 
1657 1662
 	totals := service.FindGoodInfoByNameOne(specification_name, adminUserInfo.CurrentOrgId, good_id, id, good_name)

+ 1 - 0
models/good_models.go Voir le fichier

@@ -80,6 +80,7 @@ type GoodInfo struct {
80 80
 	StWarehousingInfo           []*StWarehousingInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"xt_warehouse_info"`
81 81
 	CancelStockInfo             []*CancelStockInfo   `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"cancel_stock_info"`
82 82
 	GoodSotckInfo               []*GoodSotckInfo     `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"good_stock_in"`
83
+	RegisterNumber              string               `gorm:"column:register_number" json:"register_number" form:"register_number"`
83 84
 }
84 85
 
85 86
 func (GoodInfo) TableName() string {

+ 1 - 0
models/his_charge_models.go Voir le fichier

@@ -172,6 +172,7 @@ type HisChargeGoodInfo struct {
172 172
 	GoodName           string `gorm:"column:good_name" json:"good_name" form:"good_name"`
173 173
 	GoodUnit           int64  `gorm:"column:good_unit" json:"good_unit"`
174 174
 	SpecificationnName string `gorm:"column:specification_name" json:"specification_name" form:"specification_name"`
175
+	RegisterNumber     string `gorm:"column:register_number" json:"register_number" form:"register_number"`
175 176
 }
176 177
 
177 178
 func (HisChargeGoodInfo) TableName() string {

+ 3 - 3
models/his_models.go Voir le fichier

@@ -467,9 +467,8 @@ type TempHisOrder struct {
467 467
 	Creator               int64     `gorm:"column:creator" json:"creator" form:"creator"`
468 468
 	PType                 int64     `gorm:"column:p_type" json:"p_type" form:"p_type"`
469 469
 	AccountPrice          float64   `gorm:"column:account_price" json:"account_price" form:"account_price"`
470
-
471
-	FaPiaoCode   string `gorm:"column:fa_piao_code" json:"fa_piao_code" form:"fa_piao_code"`
472
-	FaPiaoNumber string `gorm:"column:fa_piao_number" json:"fa_piao_number" form:"fa_piao_number"`
470
+	FaPiaoCode            string    `gorm:"column:fa_piao_code" json:"fa_piao_code" form:"fa_piao_code"`
471
+	FaPiaoNumber          string    `gorm:"column:fa_piao_number" json:"fa_piao_number" form:"fa_piao_number"`
473 472
 
474 473
 	AdminUser AdminUser `gorm:"ForeignKey:ID;AssociationForeignKey:OrderId" json:"order_info"`
475 474
 
@@ -508,6 +507,7 @@ type HisPrescription struct {
508 507
 	HisPrescriptionProject []*HisPrescriptionProject `gorm:"ForeignKey:PrescriptionId;AssociationForeignKey:ID" json:"project"`
509 508
 	HisAdditionalCharge    []*HisAdditionalCharge    `gorm:"ForeignKey:PrescriptionId;AssociationForeignKey:ID" json:"addition"`
510 509
 	HisPrescriptionInfo    HisPrescriptionInfo       `gorm:"ForeignKey:PatientId,RecordDate;AssociationForeignKey:PatientId,ScheduleDate" json:"info"`
510
+	HisOrder               HisOrder                  `gorm:"ForeignKey:PrescriptionId;AssociationForeignKey:ID" json:"addition"`
511 511
 	Total                  string                    `gorm:"-" json:"total" form:"total"`
512 512
 	PType                  int64                     `gorm:"column:p_type" json:"p_type" form:"p_type"`
513 513
 	MedType                string                    `gorm:"column:med_type" json:"med_type" form:"med_type"`

+ 1 - 0
models/stock_models.go Voir le fichier

@@ -317,6 +317,7 @@ type WarehousingGoodInfo struct {
317 317
 	Dealers           Dealer       `gorm:"ForeignKey:Dealer;AssociationForeignKey:ID" json:"dealers"`
318 318
 	BuyPrice          float64      `gorm:"column:buy_price" json:"buy_price"`
319 319
 	Total             float64      `gorm:"column:total" json:"total" form:"total"`
320
+	RegisterNumber    string       `gorm:"column:register_number" json:"register_number" form:"register_number"`
320 321
 }
321 322
 
322 323
 func (WarehousingGoodInfo) TableName() string {

+ 1 - 0
models/stock_query_models.go Voir le fichier

@@ -14,6 +14,7 @@ type StockInfo struct {
14 14
 	QueryWarehouseOutInfo []QueryWarehouseOutInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"query_warehouseout_info"`
15 15
 	QueryCancelStockInfo  []QueryCancelStockInfo  `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"query_cancel_stock_info"`
16 16
 	GoodsType             GoodsType               `gorm:"ForeignKey:GoodTypeId;AssociationForeignKey:ID" json:"type"`
17
+	RegisterNumber        string                  `gorm:"column:register_number" json:"register_number" form:"register_number"`
17 18
 }
18 19
 
19 20
 func (StockInfo) TableName() string {

+ 1 - 0
service/stock_service.go Voir le fichier

@@ -246,6 +246,7 @@ func ModifyGoodInfo(goodInfo *models.GoodInfo) (error, *models.GoodInfo) {
246 246
 		"packing_price":                  goodInfo.PackingPrice,
247 247
 		"default_count_unit":             goodInfo.DefaultCountUnit,
248 248
 		"min_unit":                       goodInfo.MinUnit,
249
+		"register_number":                goodInfo.RegisterNumber,
249 250
 	}).Error
250 251
 
251 252
 	writeDb.Model(&models.WarehousingInfo{}).Where("good_id = ? AND org_id = ?", goodInfo.ID, goodInfo.OrgId).Updates(map[string]interface{}{"good_type_id": goodInfo.GoodTypeId})