Browse Source

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

陈少旭 4 months ago
parent
commit
e3c2b3e97c

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

23
 	"github.com/gorilla/websocket"
23
 	"github.com/gorilla/websocket"
24
 	"github.com/jinzhu/gorm"
24
 	"github.com/jinzhu/gorm"
25
 	"github.com/shopspring/decimal"
25
 	"github.com/shopspring/decimal"
26
-
26
+	"github.com/go-ole/go-ole"
27
 	"github.com/go-ole/go-ole/oleutil"
27
 	"github.com/go-ole/go-ole/oleutil"
28
 	"io"
28
 	"io"
29
 	"io/ioutil"
29
 	"io/ioutil"
1597
 	struct3505.FixmedinsHilistId = miConfig.Code
1597
 	struct3505.FixmedinsHilistId = miConfig.Code
1598
 	struct3505.FixmedinsHilistName = miConfig.OrgName
1598
 	struct3505.FixmedinsHilistName = miConfig.OrgName
1599
 	struct3505.FixmedinsBchno = drug.NewDrugWarehouseInfo.Bchno
1599
 	struct3505.FixmedinsBchno = drug.NewDrugWarehouseInfo.Bchno
1600
+	struct3505.Opter = role.UserName
1600
 
1601
 
1601
 	struct3505.FixmedinsCode = miConfig.Code
1602
 	struct3505.FixmedinsCode = miConfig.Code
1602
 	roles, _ := service.GetAdminUserInfoByID(org_id, pre.Creator)
1603
 	roles, _ := service.GetAdminUserInfoByID(org_id, pre.Creator)
1607
 	struct3505.SetlId = order.SetlId
1608
 	struct3505.SetlId = order.SetlId
1608
 	struct3505.MdtrtSn = order.MdtrtId
1609
 	struct3505.MdtrtSn = order.MdtrtId
1609
 	struct3505.ManuLotnum = drug.Number
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
 	struct3505.ExpyEnd = ""
1612
 	struct3505.ExpyEnd = ""
1612
 	struct3505.RxFlag = "0"
1613
 	struct3505.RxFlag = "0"
1613
 	struct3505.TrdnFlag = "1"
1614
 	struct3505.TrdnFlag = "1"

+ 1 - 1
models/new_stock_models.go View File

438
 	OrderId                   int64                `gorm:"column:order_id" json:"order_id" form:"order_id"`
438
 	OrderId                   int64                `gorm:"column:order_id" json:"order_id" form:"order_id"`
439
 	IsSale                    int64                `gorm:"column:is_sale" json:"is_sale" form:"is_sale"`
439
 	IsSale                    int64                `gorm:"column:is_sale" json:"is_sale" form:"is_sale"`
440
 	IsChange                  int64                `gorm:"column:is_change" json:"is_change" form:"is_change"`
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
 	Bchno                     string               `gorm:"column:bchno" json:"bchno" form:"bchno"`
442
 	Bchno                     string               `gorm:"column:bchno" json:"bchno" form:"bchno"`
443
 	SaleDate                  string               `gorm:"column:sale_date" json:"sale_date" form:"sale_date"`
443
 	SaleDate                  string               `gorm:"column:sale_date" json:"sale_date" form:"sale_date"`
444
 }
444
 }

+ 10 - 6
service/fj_service.go View File

3082
 	inputData["inv_chg_opter_name"] = ""                        // 人员编号 (来自1101接口返回)
3082
 	inputData["inv_chg_opter_name"] = ""                        // 人员编号 (来自1101接口返回)
3083
 	inputData["memo"] = struct3502.Memo                         // 人员编号 (来自1101接口返回)
3083
 	inputData["memo"] = struct3502.Memo                         // 人员编号 (来自1101接口返回)
3084
 	inputData["trdn_flag"] = ""                                 // 人员编号 (来自1101接口返回)
3084
 	inputData["trdn_flag"] = ""                                 // 人员编号 (来自1101接口返回)
3085
-	druginputData["drug_trac_codg"] = "12345678912345678901"
3085
+	druginputData["drug_trac_codg"] = ""
3086
 	inputData["drug_trac_info"] = druginputData
3086
 	inputData["drug_trac_info"] = druginputData
3087
 	input["invinfo"] = inputData
3087
 	input["invinfo"] = inputData
3088
 	inputMessage["input"] = input //交易输入
3088
 	inputMessage["input"] = input //交易输入
3113
 	input := make(map[string]interface{})
3113
 	input := make(map[string]interface{})
3114
 	inputData := make(map[string]interface{})
3114
 	inputData := make(map[string]interface{})
3115
 	druginputData := make(map[string]interface{})
3115
 	druginputData := make(map[string]interface{})
3116
-	druginputData2 := make(map[string]interface{})
3116
+	//druginputData2 := make(map[string]interface{})
3117
 
3117
 
3118
 	inputMessage["infno"] = "3505"                                  // 交易编码
3118
 	inputMessage["infno"] = "3505"                                  // 交易编码
3119
 	inputData["med_list_codg"] = struct3505.MedListCodg             // 定点医药机构目录编号
3119
 	inputData["med_list_codg"] = struct3505.MedListCodg             // 定点医药机构目录编号
3157
 	inputData["sel_retn_cnt"] = struct3505.SelRetnCnt              // 人员编号 (来自1101接口返回)
3157
 	inputData["sel_retn_cnt"] = struct3505.SelRetnCnt              // 人员编号 (来自1101接口返回)
3158
 	inputData["sel_retn_time"] = struct3505.SelRetnTime            // 人员编号 (来自1101接口返回)
3158
 	inputData["sel_retn_time"] = struct3505.SelRetnTime            // 人员编号 (来自1101接口返回)
3159
 	inputData["sel_retn_opter_name"] = struct3505.SelRetnOpterName // 人员编号 (来自1101接口返回)
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
 	input["selinfo"] = inputData
3167
 	input["selinfo"] = inputData
3166
 	inputMessage["input"] = input //交易输入
3168
 	inputMessage["input"] = input //交易输入
3235
 	}
3237
 	}
3236
 
3238
 
3237
 	enc := mahonia.NewEncoder("gbk")
3239
 	enc := mahonia.NewEncoder("gbk")
3240
+	return "", "", ""
3241
+
3238
 	output, err_msg := GetFjBusinessHandleInfo([]byte(enc.ConvertString(string(bytesData))))
3242
 	output, err_msg := GetFjBusinessHandleInfo([]byte(enc.ConvertString(string(bytesData))))
3239
 	return output, requestLog, err_msg
3243
 	return output, requestLog, err_msg
3240
 
3244
 

+ 2 - 2
service/his_service.go View File

1710
 
1710
 
1711
 func GetNewDrugFlowInfo(id_arr []string) (flows []*models.DrugFlow, err error) {
1711
 func GetNewDrugFlowInfo(id_arr []string) (flows []*models.DrugFlow, err error) {
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 {
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
 	return
1715
 	return
1716
 }
1716
 }
1717
 
1717