|
@@ -182,6 +182,14 @@ func (this *TargetController) DataAdd() {
|
|
|
br.ErrMsg = "新增失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
+ //将该指标的code加入到 “手工数据导入后刷新” 缓存
|
|
|
+ if utils.Re == nil {
|
|
|
+ err := utils.Rc.LPush(utils.CACHE_IMPORT_MANUAL_DATA, edbdata.TradeCode)
|
|
|
+ if err != nil {
|
|
|
+ fmt.Println("CACHE_IMPORT_MANUAL_DATA LPush Err:" + err.Error())
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
br.Ret = 200
|
|
|
br.Success = true
|
|
|
br.Msg = "新增成功"
|
|
@@ -313,6 +321,13 @@ func (this *TargetController) DataEdit() {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ //将该指标的code加入到 “手工数据导入后刷新” 缓存
|
|
|
+ if utils.Re == nil {
|
|
|
+ err := utils.Rc.LPush(utils.CACHE_IMPORT_MANUAL_DATA, edbdata.TradeCode)
|
|
|
+ if err != nil {
|
|
|
+ fmt.Println("CACHE_IMPORT_MANUAL_DATA LPush Err:" + err.Error())
|
|
|
+ }
|
|
|
+ }
|
|
|
br.Ret = 200
|
|
|
br.Success = true
|
|
|
br.Msg = "编辑成功"
|
|
@@ -2393,13 +2408,13 @@ func (this *TargetController) TargetFrequencyList() {
|
|
|
|
|
|
func sortEdbFrequency(frequencyList []string) (newFrequencyList []string) {
|
|
|
var frequencyMap1 = map[string]int{
|
|
|
- "日度": 1,
|
|
|
- "周度": 2,
|
|
|
- "旬度": 3,
|
|
|
- "月度": 4,
|
|
|
- "季度": 5,
|
|
|
+ "日度": 1,
|
|
|
+ "周度": 2,
|
|
|
+ "旬度": 3,
|
|
|
+ "月度": 4,
|
|
|
+ "季度": 5,
|
|
|
"半年度": 6,
|
|
|
- "年度": 7,
|
|
|
+ "年度": 7,
|
|
|
}
|
|
|
|
|
|
var frequencyMap2 = map[int]string{
|
|
@@ -3485,7 +3500,7 @@ func (this *TargetController) ExcelDataAdd() {
|
|
|
valueListMap[index] = valueMap["m"].(string)
|
|
|
|
|
|
// 09-27 千位分隔符时用 "m" 取字符串存数据库会把逗号当小数点,现在换用 "v" 直接取数字再转为字符串,看看会不会有问题
|
|
|
- if ct, ok := valueMap["ct"].(map[string]interface{}); ok{
|
|
|
+ if ct, ok := valueMap["ct"].(map[string]interface{}); ok {
|
|
|
fa, _ := ct["fa"]
|
|
|
if fa == "#,##0.000" {
|
|
|
value = valueMap["v"]
|