contract 部分代码修改
This commit is contained in:
parent
4abf550246
commit
68d53191fc
@ -15,7 +15,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func GetArtistInfoByArtistUid(artistUid string) (user model.User, err error) {
|
func GetArtistInfoByArtistUid(artistUid string) (user model.User, err error) {
|
||||||
if err = db.DB.Where("mgmt_artist_uid = ?", artistUid).First(&user).Error; err != nil {
|
|
||||||
|
if err = db.DB.Where("mgmt_acc_id = ?", artistUid).Preload("RealNameInfo").Find(&user).Error; err != nil {
|
||||||
zap.L().Error("get user info err", zap.Error(err))
|
zap.L().Error("get user info err", zap.Error(err))
|
||||||
err = errors.New(m.ERROR_SELECT)
|
err = errors.New(m.ERROR_SELECT)
|
||||||
return
|
return
|
||||||
|
@ -209,10 +209,16 @@ func (a *Contract) SignContract(req *contract.SignContractRequest) (rep *contrac
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
//根据画家id获取画家具体信息
|
// //根据画家id获取画家具体信息
|
||||||
artistDetailResponse, customerId, err := GetArtistInfoById(req.ArtistUid)
|
// artistDetailResponse, customerId, err := GetArtistInfoById(req.ArtistUid)
|
||||||
|
// if err != nil {
|
||||||
|
// return rep, err
|
||||||
|
// }
|
||||||
|
|
||||||
|
//返回画家信息
|
||||||
|
artistDetailResponse, err := dao.GetArtistInfoByArtistUid(req.ArtistUid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return rep, err
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if contractInfo.Type != 4 && contractInfo.Type != 7 {
|
if contractInfo.Type != 4 && contractInfo.Type != 7 {
|
||||||
@ -224,10 +230,10 @@ func (a *Contract) SignContract(req *contract.SignContractRequest) (rep *contrac
|
|||||||
parameterMap := make((map[string]string), 0)
|
parameterMap := make((map[string]string), 0)
|
||||||
|
|
||||||
// 一、 模板填充
|
// 一、 模板填充
|
||||||
parameterMap["PartyAName"] = artistDetailResponse.ProfileInfo.Name
|
parameterMap["PartyAName"] = artistDetailResponse.RealNameInfo.Name
|
||||||
parameterMap["PartyAAddress"] = artistDetailResponse.ProfileInfo.Address
|
parameterMap["PartyAAddress"] = artistDetailResponse.RealNameInfo.Address
|
||||||
parameterMap["PartyAIdentityCard"] = artistDetailResponse.ProfileInfo.CardId
|
parameterMap["PartyAIdentityCard"] = artistDetailResponse.RealNameInfo.IdNum
|
||||||
parameterMap["PartyATelNum"] = artistDetailResponse.ProfileInfo.Phone
|
parameterMap["PartyATelNum"] = artistDetailResponse.RealNameInfo.TelNum
|
||||||
parameterMap["PartyBRule"] = "240"
|
parameterMap["PartyBRule"] = "240"
|
||||||
parameterMap["SettleNum"] = "2"
|
parameterMap["SettleNum"] = "2"
|
||||||
parameterMap["SettleSec"] = "100"
|
parameterMap["SettleSec"] = "100"
|
||||||
@ -287,10 +293,10 @@ func (a *Contract) SignContract(req *contract.SignContractRequest) (rep *contrac
|
|||||||
var parameterMap = make(map[string]string)
|
var parameterMap = make(map[string]string)
|
||||||
endTime := time.Now().AddDate(1, 0, -1)
|
endTime := time.Now().AddDate(1, 0, -1)
|
||||||
parameterMap["ContractNo"] = ContractNo
|
parameterMap["ContractNo"] = ContractNo
|
||||||
parameterMap["PartyAName"] = artistDetailResponse.ProfileInfo.Name
|
parameterMap["PartyAName"] = artistDetailResponse.RealNameInfo.Name
|
||||||
parameterMap["PartyAAddress"] = artistDetailResponse.ProfileInfo.Address
|
parameterMap["PartyAAddress"] = artistDetailResponse.RealNameInfo.Address
|
||||||
parameterMap["PartyAIdentityCard"] = artistDetailResponse.ProfileInfo.CardId
|
parameterMap["PartyAIdentityCard"] = artistDetailResponse.RealNameInfo.IdNum
|
||||||
parameterMap["PartyATelNum"] = artistDetailResponse.ProfileInfo.Phone
|
parameterMap["PartyATelNum"] = artistDetailResponse.RealNameInfo.TelNum
|
||||||
parameterMap["SettleNum"] = "2"
|
parameterMap["SettleNum"] = "2"
|
||||||
parameterMap["SettleSecOne"] = "0"
|
parameterMap["SettleSecOne"] = "0"
|
||||||
parameterMap["SettleSecTwo"] = "100"
|
parameterMap["SettleSecTwo"] = "100"
|
||||||
@ -354,8 +360,8 @@ func (a *Contract) SignContract(req *contract.SignContractRequest) (rep *contrac
|
|||||||
}
|
}
|
||||||
|
|
||||||
var parameterMap = make(map[string]string)
|
var parameterMap = make(map[string]string)
|
||||||
parameterMap["PartyAName"] = artistDetailResponse.ProfileInfo.Name
|
parameterMap["PartyAName"] = artistDetailResponse.RealNameInfo.Name
|
||||||
parameterMap["PartyAIdCard"] = artistDetailResponse.ProfileInfo.CardId
|
parameterMap["PartyAIdCard"] = artistDetailResponse.RealNameInfo.IdNum
|
||||||
parameterMap["ArtworkName"] = artworkDetailResponse.ProfileInfo.ArtworkName
|
parameterMap["ArtworkName"] = artworkDetailResponse.ProfileInfo.ArtworkName
|
||||||
parameterMap["Year"] = fmt.Sprintf("%d", time.Now().Year())
|
parameterMap["Year"] = fmt.Sprintf("%d", time.Now().Year())
|
||||||
parameterMap["Month"] = fmt.Sprintf("%d", time.Now().Month())
|
parameterMap["Month"] = fmt.Sprintf("%d", time.Now().Month())
|
||||||
@ -474,7 +480,7 @@ func (a *Contract) SignContract(req *contract.SignContractRequest) (rep *contrac
|
|||||||
|
|
||||||
//一、 模板填充
|
//一、 模板填充
|
||||||
var parameterMap = make(map[string]string)
|
var parameterMap = make(map[string]string)
|
||||||
parameterMap["PartyBLegal"] = artistDetailResponse.ProfileInfo.Name
|
parameterMap["PartyBLegal"] = artistDetailResponse.RealNameInfo.Name
|
||||||
|
|
||||||
//将map转换为string类型
|
//将map转换为string类型
|
||||||
parameterMapType, err := json.Marshal(parameterMap)
|
parameterMapType, err := json.Marshal(parameterMap)
|
||||||
@ -579,7 +585,7 @@ func (a *Contract) SignContract(req *contract.SignContractRequest) (rep *contrac
|
|||||||
extSignRequest := &contractMicroservice.ExtSignRequest{
|
extSignRequest := &contractMicroservice.ExtSignRequest{
|
||||||
TransactionId: transactionId,
|
TransactionId: transactionId,
|
||||||
ContractId: contractInfo.ContractId,
|
ContractId: contractInfo.ContractId,
|
||||||
CustomerId: customerId,
|
CustomerId: artistDetailResponse.CustomerId,
|
||||||
ReturnUrl: fmt.Sprintf("%v/contractwrite?htmltype=%s&envtype=%s&token= %s", "192.168.10.7", req.HtmlType, req.EnvType, req.Token),
|
ReturnUrl: fmt.Sprintf("%v/contractwrite?htmltype=%s&envtype=%s&token= %s", "192.168.10.7", req.HtmlType, req.EnvType, req.Token),
|
||||||
DocTitle: contractInfo.ContractId,
|
DocTitle: contractInfo.ContractId,
|
||||||
OpenEnvironment: "0",
|
OpenEnvironment: "0",
|
||||||
|
Loading…
Reference in New Issue
Block a user