zwxi 8 kuukautta sitten
vanhempi
commit
90661fab10
1 muutettua tiedostoa jossa 13 lisäystä ja 12 poistoa
  1. 13 12
      controller/contract/register.go

+ 13 - 12
controller/contract/register.go

@@ -3187,7 +3187,7 @@ func (rg *RegisterController) Import(c *gin.Context) {
 						continue
 					}
 					// 开始时间/到期时间
-					if k == 62 {
+					if k == 61 {
 						// 转换失败可能是因为格式为Excel日期格式, 读取出来会是一串数字, 将其转换成日期字符串再处理
 						va := cell.Value
 						if va == "" {
@@ -3211,7 +3211,7 @@ func (rg *RegisterController) Import(c *gin.Context) {
 						rowRegister.StartDate = startDate
 						continue
 					}
-					if k == 63 {
+					if k == 62 {
 						va := cell.Value
 						if va == "" {
 							resp.Fail(fmt.Sprintf("第%d行到期时间不可为空, 请按模板导入", i+1), c)
@@ -3234,7 +3234,7 @@ func (rg *RegisterController) Import(c *gin.Context) {
 						continue
 					}
 					// 合同金额
-					if k == 64 {
+					if k == 63 {
 						amountStr := v
 						amount, e := strconv.ParseFloat(amountStr, 64)
 						if e != nil {
@@ -3245,7 +3245,7 @@ func (rg *RegisterController) Import(c *gin.Context) {
 						continue
 					}
 					// 金额单位
-					if k == 65 {
+					if k == 64 {
 						rate := rateMap[v]
 						if rate <= 0 {
 							resp.Fail(fmt.Sprintf("第%d行金额单位有误, 请按模板导入", i+1), c)
@@ -3256,7 +3256,7 @@ func (rg *RegisterController) Import(c *gin.Context) {
 						continue
 					}
 					// FICC 套餐总金额
-					if k == 66 {
+					if k == 65 {
 						amountStr := v
 						amount, _ := strconv.ParseFloat(amountStr, 64)
 						if amount > 0 {
@@ -3271,7 +3271,7 @@ func (rg *RegisterController) Import(c *gin.Context) {
 						continue
 					}
 					// 权益套餐总金额
-					if k == 67 {
+					if k == 66 {
 						amountStr := v
 						amount, _ := strconv.ParseFloat(amountStr, 64)
 						if amount > 0 {
@@ -3286,12 +3286,12 @@ func (rg *RegisterController) Import(c *gin.Context) {
 						continue
 					}
 					// 约定付款日期
-					if k == 68 {
+					if k == 67 {
 						rowRegister.AgreedPayTime = v
 						continue
 					}
 					// 签订日
-					if k == 69 {
+					if k == 68 {
 						va := cell.Value
 						if va == "" {
 							continue
@@ -3313,7 +3313,7 @@ func (rg *RegisterController) Import(c *gin.Context) {
 						continue
 					}
 					// 合同状态
-					if k == 70 {
+					if k == 69 {
 						rowRegister.ContractStatus = fms.ContractStatusNameKeyMap[v]
 						if rowRegister.ContractStatus == 0 {
 							resp.Fail(fmt.Sprintf("第%d行合同状态不匹配, 请按模板导入", i+1), c)
@@ -3322,7 +3322,7 @@ func (rg *RegisterController) Import(c *gin.Context) {
 						continue
 					}
 					// 合同编号
-					if k == 71 {
+					if k == 70 {
 						rowContractCode := v
 						if rowContractCode == "" {
 							resp.Fail(fmt.Sprintf("第%d行合同编号不可为空, 请按模板导入", i+1), c)
@@ -3337,12 +3337,13 @@ func (rg *RegisterController) Import(c *gin.Context) {
 						continue
 					}
 					// 合规备注
-					if k == 72 {
+					if k == 71 {
 						rowRegister.Remark = v
 						continue
 					}
 					// 开票列表
-					k2 := 72
+
+					k2 := 71
 					for ir := 0; ir < invoiceMax; ir++ {
 						n := ir + 1
 						// 开票日