Browse Source

修改生成协议转让合同BUG

zhou.xiaoning 3 years ago
parent
commit
170c5c6676
2 changed files with 13 additions and 11 deletions
  1. 13 11
      service/thjNtf.go
  2. BIN
      static/协议转让合同.docx

+ 13 - 11
service/thjNtf.go

@@ -355,8 +355,9 @@ func onTHJPurchaseTransferNtf(bytes *[]byte) {
 	}
 
 	docx1 := r.Editable()
+	// global.M2A_LOG.Info(docx1.GetContent())
 	docx1.Replace("TRANSFERID", strconv.Itoa(int(thjpurchasetransfer.TRANSFERID)), -1)
-	if transfertradedate, e := time.Parse("20060102", thjpurchasetransfer.TRANSFERTRADEDATE); e != nil {
+	if transfertradedate, e := time.Parse("20060102", thjpurchasetransfer.TRANSFERTRADEDATE); e == nil {
 		docx1.Replace("TRANSFERTRADEDATE", transfertradedate.Format("2006年01月02日"), -1)
 	}
 	docx1.Replace("WRSTANDARDNAME", wrstandard.WRSTANDARDNAME, -1)
@@ -379,23 +380,23 @@ func onTHJPurchaseTransferNtf(bytes *[]byte) {
 	docx1.Replace("PARTYA_DESADDRESS", a_totalAddress, -1)
 	docx1.Replace("PARTYA_CARDNUM", a_userinfo.CARDNUM, -1)
 	docx1.Replace("PARTYA_MOBILE", a_userinfo.MOBILE, -1)
-	docx1.Replace("PARTYA_BANK_BANKACCOUNTNO",
+	docx1.Replace("AAAAAAA",
 		fmt.Sprintf("%v%v", a_bankinfo.BANKNAME, a_bankaccountsign.BANKACCOUNTNO), -1)
 	// ********************* 乙方 *********************
 	// 判断乙方是公司还是个人
 	if b_userinfo.USERINFOTYPE == 1 {
 		// 个人
-		docx1.Replace("PARTYB_COMPANY", "", -1)
-		docx1.Replace("PARTYB_LEGALPERSONNAME", b_userinfo.CUSTOMERNAME, -1)
+		docx1.Replace("COMPANY", "", -1)
+		docx1.Replace("LEGALPERSONNAME", b_userinfo.CUSTOMERNAME, -1)
 	} else {
 		// 公司
-		docx1.Replace("PARTYB_COMPANY", b_userinfo.CUSTOMERNAME, -1)
-		docx1.Replace("PARTYB_LEGALPERSONNAME", b_userinfo.LEGALPERSONNAME, -1)
+		docx1.Replace("COMPANY", b_userinfo.CUSTOMERNAME, -1)
+		docx1.Replace("LEGALPERSONNAME", b_userinfo.LEGALPERSONNAME, -1)
 	}
-	docx1.Replace("PARTYB_DESADDRESS", b_totalAddress, -1)
-	docx1.Replace("PARTYB_CARDNUM", b_userinfo.CARDNUM, -1)
-	docx1.Replace("PARTYB_MOBILE", b_userinfo.MOBILE, -1)
-	docx1.Replace("PARTYB_BANK_BANKACCOUNTNO",
+	docx1.Replace("DESADDRESS", b_totalAddress, -1)
+	docx1.Replace("CARDNUM", b_userinfo.CARDNUM, -1)
+	docx1.Replace("MOBILE", b_userinfo.MOBILE, -1)
+	docx1.Replace("BBBBBBB",
 		fmt.Sprintf("%v%v", b_bankinfo.BANKNAME, b_bankaccountsign.BANKACCOUNTNO), -1)
 
 	// 暂存docx文件
@@ -553,8 +554,9 @@ func buildWRTradeDealedContract(wrtradetradequote model.Wrtradetradequote, buyOr
 	global.M2A_DB.SQL(sql).Get(&_temp)
 
 	docx1 := r.Editable()
+	// global.M2A_LOG.Info(docx1.GetContent())
 	docx1.Replace("${WRTRADEDETAILID}", strconv.Itoa(int(wrtradetradequote.WRTRADEDETAILID)), -1)
-	if transfertradedate, e := time.Parse("20060102", wrtradetradequote.TRADEDATE); e != nil {
+	if transfertradedate, e := time.Parse("20060102", wrtradetradequote.TRADEDATE); e == nil {
 		docx1.Replace("TRADEDATE", transfertradedate.Format("2006年01月02日"), -1)
 	}
 	// 判断是公司还是个人

BIN
static/协议转让合同.docx