Sfoglia il codice sorgente

Merge branch 'master' of http://git.shengws.com/csx/gdyb

陈少旭 4 mesi fa
parent
commit
e3c2b3e97c

+ 3 - 2
controllers/sg/his_api_controller.go Vedi File

@@ -23,7 +23,7 @@ import (
23 23
 	"github.com/gorilla/websocket"
24 24
 	"github.com/jinzhu/gorm"
25 25
 	"github.com/shopspring/decimal"
26
-
26
+	"github.com/go-ole/go-ole"
27 27
 	"github.com/go-ole/go-ole/oleutil"
28 28
 	"io"
29 29
 	"io/ioutil"
@@ -1597,6 +1597,7 @@ func SaleStock(org_id int64, pre models.HisPrescription, drug *models.DrugFlow,
1597 1597
 	struct3505.FixmedinsHilistId = miConfig.Code
1598 1598
 	struct3505.FixmedinsHilistName = miConfig.OrgName
1599 1599
 	struct3505.FixmedinsBchno = drug.NewDrugWarehouseInfo.Bchno
1600
+	struct3505.Opter = role.UserName
1600 1601
 
1601 1602
 	struct3505.FixmedinsCode = miConfig.Code
1602 1603
 	roles, _ := service.GetAdminUserInfoByID(org_id, pre.Creator)
@@ -1607,7 +1608,7 @@ func SaleStock(org_id int64, pre models.HisPrescription, drug *models.DrugFlow,
1607 1608
 	struct3505.SetlId = order.SetlId
1608 1609
 	struct3505.MdtrtSn = order.MdtrtId
1609 1610
 	struct3505.ManuLotnum = drug.Number
1610
-	struct3505.ManuDate = time.Unix(drug.ProductDate, 0).Format("2006-01-02 15:04:05")
1611
+	struct3505.ManuDate = time.Unix(drug.ProductDate, 0).Format("2006-01-02")
1611 1612
 	struct3505.ExpyEnd = ""
1612 1613
 	struct3505.RxFlag = "0"
1613 1614
 	struct3505.TrdnFlag = "1"

+ 1 - 1
models/new_stock_models.go Vedi File

@@ -438,7 +438,7 @@ type DrugFlow struct {
438 438
 	OrderId                   int64                `gorm:"column:order_id" json:"order_id" form:"order_id"`
439 439
 	IsSale                    int64                `gorm:"column:is_sale" json:"is_sale" form:"is_sale"`
440 440
 	IsChange                  int64                `gorm:"column:is_change" json:"is_change" form:"is_change"`
441
-	NewDrugWarehouseInfo      NewDrugWarehouseInfo `gorm:"ForeignKey:ID;AssociationForeignKey:WarehousingId" json:"dw"`
441
+	NewDrugWarehouseInfo      NewDrugWarehouseInfo `gorm:"ForeignKey:ID;AssociationForeignKey:WarehousingDetailId" json:"dw"`
442 442
 	Bchno                     string               `gorm:"column:bchno" json:"bchno" form:"bchno"`
443 443
 	SaleDate                  string               `gorm:"column:sale_date" json:"sale_date" form:"sale_date"`
444 444
 }

+ 10 - 6
service/fj_service.go Vedi File

@@ -3082,7 +3082,7 @@ func FJyb3502(struct3502 models.Struct3502) (string, string, string) {
3082 3082
 	inputData["inv_chg_opter_name"] = ""                        // 人员编号 (来自1101接口返回)
3083 3083
 	inputData["memo"] = struct3502.Memo                         // 人员编号 (来自1101接口返回)
3084 3084
 	inputData["trdn_flag"] = ""                                 // 人员编号 (来自1101接口返回)
3085
-	druginputData["drug_trac_codg"] = "12345678912345678901"
3085
+	druginputData["drug_trac_codg"] = ""
3086 3086
 	inputData["drug_trac_info"] = druginputData
3087 3087
 	input["invinfo"] = inputData
3088 3088
 	inputMessage["input"] = input //交易输入
@@ -3113,7 +3113,7 @@ func FJyb3505(struct3505 models.Struct3505) (string, string, string) {
3113 3113
 	input := make(map[string]interface{})
3114 3114
 	inputData := make(map[string]interface{})
3115 3115
 	druginputData := make(map[string]interface{})
3116
-	druginputData2 := make(map[string]interface{})
3116
+	//druginputData2 := make(map[string]interface{})
3117 3117
 
3118 3118
 	inputMessage["infno"] = "3505"                                  // 交易编码
3119 3119
 	inputData["med_list_codg"] = struct3505.MedListCodg             // 定点医药机构目录编号
@@ -3157,10 +3157,12 @@ func FJyb3505(struct3505 models.Struct3505) (string, string, string) {
3157 3157
 	inputData["sel_retn_cnt"] = struct3505.SelRetnCnt              // 人员编号 (来自1101接口返回)
3158 3158
 	inputData["sel_retn_time"] = struct3505.SelRetnTime            // 人员编号 (来自1101接口返回)
3159 3159
 	inputData["sel_retn_opter_name"] = struct3505.SelRetnOpterName // 人员编号 (来自1101接口返回)
3160
-	inputData["memo"] = struct3505.Memo                            // 人员编号 (来自1101接口返回)
3161
-	druginputData["drug_trac_codg"] = ""
3162
-	druginputData2["drugtracinfo"] = druginputData
3163
-	inputData["drug_trac_info"] = druginputData2
3160
+	inputData["memo"] = struct3505.Memo
3161
+	inputData["mdtrt_setl_type"] = struct3505.MdtrtSetlType                            // 人员编号 (来自1101接口返回)
3162
+	// 人员编号 (来自1101接口返回)
3163
+	//druginputData["drug_trac_codg"] = ""
3164
+	//druginputData2["drugtracinfo"] = druginputData
3165
+	inputData["drug_trac_info"] = druginputData
3164 3166
 
3165 3167
 	input["selinfo"] = inputData
3166 3168
 	inputMessage["input"] = input //交易输入
@@ -3235,6 +3237,8 @@ func FJyb3506(struct3506 models.Struct3506) (string, string, string) {
3235 3237
 	}
3236 3238
 
3237 3239
 	enc := mahonia.NewEncoder("gbk")
3240
+	return "", "", ""
3241
+
3238 3242
 	output, err_msg := GetFjBusinessHandleInfo([]byte(enc.ConvertString(string(bytesData))))
3239 3243
 	return output, requestLog, err_msg
3240 3244
 

+ 2 - 2
service/his_service.go Vedi File

@@ -1710,8 +1710,8 @@ func GetNewDrugWarehouseInfo(id_arr []string) (newDrugWarehouse []*models.NewDru
1710 1710
 
1711 1711
 func GetNewDrugFlowInfo(id_arr []string) (flows []*models.DrugFlow, err error) {
1712 1712
 	err = readDb.Model(&models.DrugFlow{}).Where("user_org_id = ? and status = 1 and id in (?)", 10191, id_arr).Preload("HisDoctorAdviceInfo", func(db *gorm.DB) *gorm.DB {
1713
-		return db.Where("status = 1").Preload("BaseDrugLib", "status=1").Preload("NewDrugWarehouseInfo", "status = 1")
1714
-	}).Find(&flows).Error
1713
+		return db.Where("status = 1").Preload("BaseDrugLib", "status=1")
1714
+	}).Preload("NewDrugWarehouseInfo", "status = 1").Find(&flows).Error
1715 1715
 	return
1716 1716
 }
1717 1717