|
@@ -222,6 +222,23 @@ func Copy(oldExcelInfo *excelModel.ExcelInfo, excelClassifyId int, excelName str
|
|
|
errMsg = "保存失败"
|
|
|
}
|
|
|
|
|
|
+ // 混合表格-条件格式配置
|
|
|
+ excelRules, e := excelModel.GetExcelRuleMappingsByExcelInfoId(oldExcelInfo.ExcelInfoId)
|
|
|
+ if e != nil {
|
|
|
+ err = fmt.Errorf("获取条件格式配置失败, %v", e)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if len(excelRules) > 0 {
|
|
|
+ for _, v := range excelRules {
|
|
|
+ v.ExcelInfoRuleMappingId = 0
|
|
|
+ v.ExcelInfoId = excelInfo.ExcelInfoId
|
|
|
+ }
|
|
|
+ mappingOb := new(excelModel.ExcelInfoRuleMapping)
|
|
|
+ if e = mappingOb.CreateMulti(excelRules); e != nil {
|
|
|
+ err = fmt.Errorf("复制条件格式配置失败, %v", e)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
return
|
|
|
}
|
|
|
|