|
@@ -1806,9 +1806,9 @@ func (rg *RegisterController) Export(c *gin.Context) {
|
|
|
}
|
|
|
|
|
|
// 获取小套餐品种
|
|
|
- cpCond := `product_id = ? AND permission_name <> ? AND enabled = 1 AND parent_id> 0 `
|
|
|
+ cpCond := `product_id = ? AND permission_name <> ? AND permission_name <> ? AND enabled = 1 AND parent_id> 0 `
|
|
|
cpPars := make([]interface{}, 0)
|
|
|
- cpPars = append(cpPars, crm.CompanyProductFicc, crm.ChartPermissionStrategyName)
|
|
|
+ cpPars = append(cpPars, crm.CompanyProductFicc, crm.ChartPermissionStrategyName, crm.ChartPermissionFixedIncomeName)
|
|
|
cp := new(crm.ChartPermission)
|
|
|
permissionList, e := cp.List(cpCond, cpPars)
|
|
|
if e != nil {
|
|
@@ -2885,6 +2885,12 @@ func (rg *RegisterController) Import(c *gin.Context) {
|
|
|
return
|
|
|
}
|
|
|
continue
|
|
|
+ } else if k == 42 {
|
|
|
+ if text != "固定收益" {
|
|
|
+ resp.Fail("【固定收益】列名称有误, 请参考模板导入", c)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ continue
|
|
|
}
|
|
|
}
|
|
|
} else if i >= 3 {
|
|
@@ -3046,7 +3052,7 @@ func (rg *RegisterController) Import(c *gin.Context) {
|
|
|
continue
|
|
|
}
|
|
|
// 其他类型套餐
|
|
|
- if k >= 33 && k <= 41 {
|
|
|
+ if k >= 33 && k <= 42 {
|
|
|
if v == "是" {
|
|
|
tempItem := serviceTempNameMap[titleMap[k]]
|
|
|
if tempItem == nil {
|
|
@@ -3067,10 +3073,10 @@ func (rg *RegisterController) Import(c *gin.Context) {
|
|
|
}
|
|
|
continue
|
|
|
}
|
|
|
- if k >= 42 && k <= 52 {
|
|
|
+ if k >= 43 && k <= 53 {
|
|
|
if v == "是" {
|
|
|
// 权益大套餐
|
|
|
- if k <= 43 {
|
|
|
+ if k <= 44 {
|
|
|
//新增
|
|
|
parentName := "权益大套餐"
|
|
|
tempItem := raiServiceTempNameMap[titleMap[k]]
|
|
@@ -3167,7 +3173,7 @@ func (rg *RegisterController) Import(c *gin.Context) {
|
|
|
continue
|
|
|
}
|
|
|
// 权益研选等套餐
|
|
|
- if k >= 53 && k <= 60 {
|
|
|
+ if k >= 54 && k <= 61 {
|
|
|
if v == "是" {
|
|
|
tempItem := raiServiceTempNameMap[titleMap[k]]
|
|
|
if tempItem == nil {
|
|
@@ -3189,12 +3195,12 @@ func (rg *RegisterController) Import(c *gin.Context) {
|
|
|
continue
|
|
|
}
|
|
|
// 套餐备注
|
|
|
- if k == 61 {
|
|
|
+ if k == 62 {
|
|
|
rowRegister.ServiceRemark = v
|
|
|
continue
|
|
|
}
|
|
|
// 开始时间/到期时间
|
|
|
- if k == 62 {
|
|
|
+ if k == 63 {
|
|
|
// 转换失败可能是因为格式为Excel日期格式, 读取出来会是一串数字, 将其转换成日期字符串再处理
|
|
|
va := cell.Value
|
|
|
if va == "" {
|
|
@@ -3218,7 +3224,7 @@ func (rg *RegisterController) Import(c *gin.Context) {
|
|
|
rowRegister.StartDate = startDate
|
|
|
continue
|
|
|
}
|
|
|
- if k == 63 {
|
|
|
+ if k == 64 {
|
|
|
va := cell.Value
|
|
|
if va == "" {
|
|
|
resp.Fail(fmt.Sprintf("第%d行到期时间不可为空, 请按模板导入", i+1), c)
|
|
@@ -3241,7 +3247,7 @@ func (rg *RegisterController) Import(c *gin.Context) {
|
|
|
continue
|
|
|
}
|
|
|
// 合同金额
|
|
|
- if k == 64 {
|
|
|
+ if k == 65 {
|
|
|
amountStr := v
|
|
|
amount, e := strconv.ParseFloat(amountStr, 64)
|
|
|
if e != nil {
|
|
@@ -3252,7 +3258,7 @@ func (rg *RegisterController) Import(c *gin.Context) {
|
|
|
continue
|
|
|
}
|
|
|
// 金额单位
|
|
|
- if k == 65 {
|
|
|
+ if k == 66 {
|
|
|
rate := rateMap[v]
|
|
|
if rate <= 0 {
|
|
|
resp.Fail(fmt.Sprintf("第%d行金额单位有误, 请按模板导入", i+1), c)
|
|
@@ -3263,7 +3269,7 @@ func (rg *RegisterController) Import(c *gin.Context) {
|
|
|
continue
|
|
|
}
|
|
|
// FICC 套餐总金额
|
|
|
- if k == 66 {
|
|
|
+ if k == 67 {
|
|
|
amountStr := v
|
|
|
amount, _ := strconv.ParseFloat(amountStr, 64)
|
|
|
if amount > 0 {
|
|
@@ -3278,7 +3284,7 @@ func (rg *RegisterController) Import(c *gin.Context) {
|
|
|
continue
|
|
|
}
|
|
|
// 权益套餐总金额
|
|
|
- if k == 67 {
|
|
|
+ if k == 68 {
|
|
|
amountStr := v
|
|
|
amount, _ := strconv.ParseFloat(amountStr, 64)
|
|
|
if amount > 0 {
|
|
@@ -3293,12 +3299,12 @@ func (rg *RegisterController) Import(c *gin.Context) {
|
|
|
continue
|
|
|
}
|
|
|
// 约定付款日期
|
|
|
- if k == 68 {
|
|
|
+ if k == 69 {
|
|
|
rowRegister.AgreedPayTime = v
|
|
|
continue
|
|
|
}
|
|
|
// 签订日
|
|
|
- if k == 69 {
|
|
|
+ if k == 70 {
|
|
|
va := cell.Value
|
|
|
if va == "" {
|
|
|
continue
|
|
@@ -3320,7 +3326,7 @@ func (rg *RegisterController) Import(c *gin.Context) {
|
|
|
continue
|
|
|
}
|
|
|
// 合同状态
|
|
|
- if k == 70 {
|
|
|
+ if k == 71 {
|
|
|
rowRegister.ContractStatus = fms.ContractStatusNameKeyMap[v]
|
|
|
if rowRegister.ContractStatus == 0 {
|
|
|
resp.Fail(fmt.Sprintf("第%d行合同状态不匹配, 请按模板导入", i+1), c)
|
|
@@ -3329,7 +3335,7 @@ func (rg *RegisterController) Import(c *gin.Context) {
|
|
|
continue
|
|
|
}
|
|
|
// 合同编号
|
|
|
- if k == 71 {
|
|
|
+ if k == 72 {
|
|
|
rowContractCode := v
|
|
|
if rowContractCode == "" {
|
|
|
resp.Fail(fmt.Sprintf("第%d行合同编号不可为空, 请按模板导入", i+1), c)
|
|
@@ -3344,13 +3350,13 @@ func (rg *RegisterController) Import(c *gin.Context) {
|
|
|
continue
|
|
|
}
|
|
|
// 合规备注
|
|
|
- if k == 72 {
|
|
|
+ if k == 73 {
|
|
|
rowRegister.Remark = v
|
|
|
continue
|
|
|
}
|
|
|
// 开票列表
|
|
|
|
|
|
- k2 := 72
|
|
|
+ k2 := 73
|
|
|
for ir := 0; ir < invoiceMax; ir++ {
|
|
|
n := ir + 1
|
|
|
// 开票日
|