refactor: remove many deprecated cmd and package
parent
f5df476cf4
commit
132e248237
@ -1,150 +0,0 @@
|
||||
//go:build legacy_dfb
|
||||
|
||||
// Deprecated: This file is no longer used.
|
||||
// Retained temporarily for rollback.
|
||||
// Planned removal: 2026-06-23.
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"cu-helper/internal/deprecated/wms/cryptokit"
|
||||
model2 "cu-helper/internal/deprecated/wms/model"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/go-resty/resty/v2"
|
||||
"github.com/mizuki1412/go-core-kit/class/exception"
|
||||
"github.com/mizuki1412/go-core-kit/init/initkit"
|
||||
"github.com/mizuki1412/go-core-kit/library/commonkit"
|
||||
"github.com/mizuki1412/go-core-kit/service/configkit"
|
||||
"github.com/mizuki1412/go-core-kit/service/logkit"
|
||||
"github.com/spf13/cast"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/tidwall/gjson"
|
||||
"github.com/xuri/excelize/v2"
|
||||
"golang.org/x/net/html"
|
||||
)
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(dfbCmd)
|
||||
defFlagsDfb(dfbCmd)
|
||||
}
|
||||
|
||||
var dfbCmd = &cobra.Command{
|
||||
Use: "dfb",
|
||||
Short: "Batch processing operations of the difficult fiber box",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
initkit.BindFlags(cmd)
|
||||
handleDfb()
|
||||
},
|
||||
}
|
||||
|
||||
func defFlagsDfb(cmd *cobra.Command) {
|
||||
cmd.Flags().String("wms.token", "", "*Specify the token of WMS-ZJ(装维调度系统)")
|
||||
cmd.Flags().String("path", "", "*Specify the file of excel")
|
||||
}
|
||||
|
||||
var dfbClient = resty.New().SetRetryCount(5).SetRetryWaitTime(10 * time.Second)
|
||||
|
||||
func handleDfb() {
|
||||
// Open the Excel file
|
||||
excelPath := configkit.GetString("path", "")
|
||||
if excelPath == "" {
|
||||
panic(exception.New("EXCEL文件不存在或路径错误"))
|
||||
}
|
||||
f, err := excelize.OpenFile(excelPath)
|
||||
if err != nil {
|
||||
panic(exception.New(err.Error()))
|
||||
}
|
||||
rows, err := f.GetRows("Sheet1")
|
||||
if err != nil {
|
||||
panic(exception.New(err.Error()))
|
||||
}
|
||||
h := model2.NewHeader()
|
||||
header := h.GenReqParam()
|
||||
for rowIndex, row := range rows {
|
||||
if rowIndex <= 1 {
|
||||
continue
|
||||
}
|
||||
_ = commonkit.RecoverFuncWrapper(func() {
|
||||
no := row[8] //宽带编号 I列
|
||||
fo := model2.NewGetOrderQueryList(no)
|
||||
form := fo.GenReqParam()
|
||||
logkit.Info("***开始请求*** " + no)
|
||||
resp, err := dfbClient.R().
|
||||
SetHeaders(header).SetFormData(form).Post("http://132.151.160.87:10010/wms-zj/monitor/orderQueryListAjax.do")
|
||||
if err != nil {
|
||||
panic(exception.New(err.Error()))
|
||||
}
|
||||
if resp.StatusCode() != 200 {
|
||||
panic(exception.New(resp.Status()))
|
||||
}
|
||||
totalNumber := gjson.Get(resp.String(), "pageObj.total").Int()
|
||||
if totalNumber == 0 {
|
||||
logkit.Error(no + " 该条记录不存在!")
|
||||
return
|
||||
}
|
||||
list := gjson.Get(resp.String(), "list").Array()
|
||||
if list[totalNumber-1].Get("ORDER_TYPE_NAME").String() == "改用户资料" {
|
||||
totalNumber--
|
||||
}
|
||||
if totalNumber == 0 {
|
||||
logkit.Error(no + " 该条记录不存在!")
|
||||
return
|
||||
}
|
||||
addId := list[totalNumber-1].Get("SEVEN_ADDR_ID").String()
|
||||
addName := list[totalNumber-1].Get("SEVEN_ADDR").String()
|
||||
woId := cryptokit.Encrypt(list[totalNumber-1].Get("WO_ID").String())
|
||||
shardingId := list[totalNumber-1].Get("SHARDING_ID").String()
|
||||
resp, err = dfbClient.R().
|
||||
SetHeaders(header).SetQueryParams(map[string]string{
|
||||
"woIde": woId,
|
||||
"hisFlag": "2",
|
||||
"shardingId": shardingId,
|
||||
}).Get("http://132.151.160.87:10010/wms-zj/common/installOrderDetailInfoQuery.do")
|
||||
qrCode, gqpName := extractGQPInfo(resp.String())
|
||||
f.SetCellValue("Sheet1", "C"+cast.ToString(rowIndex+1), addId)
|
||||
f.SetCellValue("Sheet1", "D"+cast.ToString(rowIndex+1), addName)
|
||||
f.SetCellValue("Sheet1", "E"+cast.ToString(rowIndex+1), qrCode)
|
||||
f.SetCellValue("Sheet1", "F"+cast.ToString(rowIndex+1), gqpName)
|
||||
})
|
||||
}
|
||||
// Save the file
|
||||
if err = f.SaveAs(excelPath); err != nil {
|
||||
panic(exception.New(err.Error()))
|
||||
}
|
||||
logkit.Info("生成结束...")
|
||||
}
|
||||
|
||||
// extractGQPInfo 解析 HTML 并提取光分线盒二维码和光分线盒名称
|
||||
func extractGQPInfo(htmlStr string) (qrCode, gqpName string) {
|
||||
doc, err := html.Parse(strings.NewReader(htmlStr))
|
||||
if err != nil {
|
||||
panic(exception.New(err.Error()))
|
||||
}
|
||||
var extractData func(*html.Node, string) string
|
||||
extractData = func(n *html.Node, key string) string {
|
||||
if n.Type == html.ElementNode && n.Data == "td" {
|
||||
// 检查当前节点的文本内容是否匹配 key
|
||||
if n.FirstChild != nil && n.FirstChild.Type == html.TextNode && strings.TrimSpace(n.FirstChild.Data) == key {
|
||||
// 获取同一行的第三个 <td> 里的 title 属性
|
||||
if nextTd := n.NextSibling.NextSibling; nextTd != nil {
|
||||
for _, attr := range nextTd.Attr {
|
||||
if attr.Key == "title" {
|
||||
return attr.Val
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 递归遍历所有子节点
|
||||
for c := n.FirstChild; c != nil; c = c.NextSibling {
|
||||
if val := extractData(c, key); val != "" {
|
||||
return val
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
qrCode = extractData(doc, "光分线盒二维码")
|
||||
gqpName = extractData(doc, "光分线盒名称")
|
||||
return
|
||||
}
|
||||
@ -1,36 +0,0 @@
|
||||
//go:build legacy_loss
|
||||
|
||||
// Deprecated: This file is no longer used.
|
||||
// Retained temporarily for rollback.
|
||||
// Planned removal: 2026-06-23.
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"cu-helper/internal/deprecated/wms/common"
|
||||
"cu-helper/internal/deprecated/wms/service"
|
||||
|
||||
"github.com/mizuki1412/go-core-kit/init/initkit"
|
||||
"github.com/mizuki1412/go-core-kit/service/logkit"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(highOpticalLossCmd)
|
||||
defFlagsLoss(highOpticalLossCmd)
|
||||
}
|
||||
|
||||
var highOpticalLossCmd = &cobra.Command{
|
||||
Use: "loss",
|
||||
Short: "Generate a High Optical Loss Report",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
initkit.BindFlags(cmd)
|
||||
m1 := service.ReqGetHighOptLossUnderList()
|
||||
logkit.Info("拿到光衰数据,开始生成...")
|
||||
common.GenExcelFile(m1)
|
||||
},
|
||||
}
|
||||
|
||||
func defFlagsLoss(cmd *cobra.Command) {
|
||||
cmd.Flags().String("wms.token", "", "*Specify the token of WMS-ZJ(装维调度系统)")
|
||||
cmd.Flags().String("loss.open", "", "*Specify the file of excel to open")
|
||||
}
|
||||
@ -1,206 +0,0 @@
|
||||
package common
|
||||
|
||||
import (
|
||||
"cu-helper/internal/deprecated/wms/service"
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/mizuki1412/go-core-kit/service/configkit"
|
||||
"github.com/mizuki1412/go-core-kit/service/logkit"
|
||||
"github.com/spf13/cast"
|
||||
"github.com/xuri/excelize/v2"
|
||||
)
|
||||
|
||||
func GenExcelFile(m1 map[string]*service.HighOptLossUnder) {
|
||||
// Open the Excel file
|
||||
open := configkit.GetString("loss.open", "")
|
||||
if open == "" {
|
||||
open = "/Users/leo/Documents/光衰通报/光衰/2025/光衰通报(11月5日).xlsx"
|
||||
}
|
||||
f, err := excelize.OpenFile(open)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
styleRed, err := f.NewStyle(&excelize.Style{
|
||||
Alignment: &excelize.Alignment{
|
||||
Horizontal: "center",
|
||||
Vertical: "center",
|
||||
},
|
||||
Border: []excelize.Border{
|
||||
{Type: "top", Style: 1, Color: "000000"},
|
||||
{Type: "bottom", Style: 1, Color: "000000"},
|
||||
{Type: "left", Style: 1, Color: "000000"},
|
||||
{Type: "right", Style: 1, Color: "000000"},
|
||||
},
|
||||
Fill: excelize.Fill{
|
||||
Type: "pattern",
|
||||
Color: []string{"C00000"}, // RGB(192,0,0)
|
||||
Pattern: 1,
|
||||
},
|
||||
Font: &excelize.Font{
|
||||
Color: "FFFFFF", // 白色
|
||||
Bold: true,
|
||||
},
|
||||
})
|
||||
styleYellow, err := f.NewStyle(&excelize.Style{
|
||||
Alignment: &excelize.Alignment{
|
||||
Horizontal: "center",
|
||||
Vertical: "center",
|
||||
},
|
||||
Border: []excelize.Border{
|
||||
{Type: "top", Style: 1, Color: "000000"},
|
||||
{Type: "bottom", Style: 1, Color: "000000"},
|
||||
{Type: "left", Style: 1, Color: "000000"},
|
||||
{Type: "right", Style: 1, Color: "000000"},
|
||||
},
|
||||
Fill: excelize.Fill{
|
||||
Type: "pattern",
|
||||
Color: []string{"FFC000"}, // RGB(255,192,0)
|
||||
Pattern: 1,
|
||||
},
|
||||
Font: &excelize.Font{
|
||||
Bold: true,
|
||||
},
|
||||
})
|
||||
styleGreen, err := f.NewStyle(&excelize.Style{
|
||||
Alignment: &excelize.Alignment{
|
||||
Horizontal: "center",
|
||||
Vertical: "center",
|
||||
},
|
||||
Border: []excelize.Border{
|
||||
{Type: "top", Style: 1, Color: "000000"},
|
||||
{Type: "bottom", Style: 1, Color: "000000"},
|
||||
{Type: "left", Style: 1, Color: "000000"},
|
||||
{Type: "right", Style: 1, Color: "000000"},
|
||||
},
|
||||
Fill: excelize.Fill{
|
||||
Type: "pattern",
|
||||
Color: []string{"92D050"}, // RGB(146,208,80)
|
||||
Pattern: 1,
|
||||
},
|
||||
Font: &excelize.Font{
|
||||
Bold: true,
|
||||
},
|
||||
})
|
||||
|
||||
// Cut and paste data from E4:E25 to C4:C25
|
||||
//TODO
|
||||
for i := 4; i <= 25; i++ {
|
||||
eCell := "E" + strconv.Itoa(i)
|
||||
cCell := "C" + strconv.Itoa(i)
|
||||
value, _ := f.GetCellValue("汇总", eCell)
|
||||
f.SetCellValue("汇总", cCell, cast.ToInt(value))
|
||||
f.SetCellValue("汇总", eCell, "")
|
||||
}
|
||||
|
||||
// Populate E4:L25 with data from the map
|
||||
//TODO
|
||||
for i := 4; i <= 25; i++ {
|
||||
bCell := "B" + strconv.Itoa(i)
|
||||
key, _ := f.GetCellValue("汇总", bCell)
|
||||
if data, ok := m1[key]; ok {
|
||||
f.SetCellValue("汇总", "E"+strconv.Itoa(i), data.UnderCount)
|
||||
if data.UnderCount == 0 {
|
||||
f.SetCellStyle("汇总", "E"+strconv.Itoa(i), "E"+strconv.Itoa(i), styleGreen)
|
||||
}
|
||||
if data.UnderCount > 0 && data.UnderCount <= 5 {
|
||||
f.SetCellStyle("汇总", "E"+strconv.Itoa(i), "E"+strconv.Itoa(i), styleYellow)
|
||||
}
|
||||
if data.UnderCount > 5 {
|
||||
f.SetCellStyle("汇总", "E"+strconv.Itoa(i), "E"+strconv.Itoa(i), styleRed)
|
||||
}
|
||||
f.SetCellValue("汇总", "F"+strconv.Itoa(i), data.DurationOverSeven)
|
||||
if data.DurationOverSeven == 0 {
|
||||
f.SetCellStyle("汇总", "F"+strconv.Itoa(i), "F"+strconv.Itoa(i), styleGreen)
|
||||
}
|
||||
if data.DurationOverSeven > 0 && data.DurationOverSeven <= 5 {
|
||||
f.SetCellStyle("汇总", "F"+strconv.Itoa(i), "F"+strconv.Itoa(i), styleYellow)
|
||||
}
|
||||
if data.DurationOverSeven > 5 {
|
||||
f.SetCellStyle("汇总", "F"+strconv.Itoa(i), "F"+strconv.Itoa(i), styleRed)
|
||||
}
|
||||
f.SetCellValue("汇总", "G"+strconv.Itoa(i), data.DurationOverFifteen)
|
||||
if data.DurationOverFifteen == 0 {
|
||||
f.SetCellStyle("汇总", "G"+strconv.Itoa(i), "G"+strconv.Itoa(i), styleGreen)
|
||||
}
|
||||
if data.DurationOverFifteen > 0 && data.DurationOverFifteen <= 5 {
|
||||
f.SetCellStyle("汇总", "G"+strconv.Itoa(i), "G"+strconv.Itoa(i), styleYellow)
|
||||
}
|
||||
if data.DurationOverFifteen > 5 {
|
||||
f.SetCellStyle("汇总", "G"+strconv.Itoa(i), "G"+strconv.Itoa(i), styleRed)
|
||||
}
|
||||
f.SetCellValue("汇总", "H"+strconv.Itoa(i), data.Book)
|
||||
f.SetCellValue("汇总", "I"+strconv.Itoa(i), data.ApplyCount)
|
||||
} else {
|
||||
f.SetCellValue("汇总", "E"+strconv.Itoa(i), 0)
|
||||
f.SetCellStyle("汇总", "E"+strconv.Itoa(i), "E"+strconv.Itoa(i), styleGreen)
|
||||
f.SetCellValue("汇总", "F"+strconv.Itoa(i), 0)
|
||||
f.SetCellStyle("汇总", "F"+strconv.Itoa(i), "F"+strconv.Itoa(i), styleGreen)
|
||||
f.SetCellValue("汇总", "G"+strconv.Itoa(i), 0)
|
||||
f.SetCellStyle("汇总", "G"+strconv.Itoa(i), "G"+strconv.Itoa(i), styleGreen)
|
||||
f.SetCellValue("汇总", "H"+strconv.Itoa(i), 0)
|
||||
f.SetCellValue("汇总", "I"+strconv.Itoa(i), 0)
|
||||
}
|
||||
}
|
||||
|
||||
// Calculate D4:D25 as C-E
|
||||
//TODO
|
||||
for i := 4; i <= 25; i++ {
|
||||
cCell := "C" + strconv.Itoa(i)
|
||||
eCell := "E" + strconv.Itoa(i)
|
||||
dCell := "D" + strconv.Itoa(i)
|
||||
cValue, _ := f.GetCellValue("汇总", cCell)
|
||||
eValue, _ := f.GetCellValue("汇总", eCell)
|
||||
cInt, _ := strconv.Atoi(cValue)
|
||||
eInt, _ := strconv.Atoi(eValue)
|
||||
f.SetCellValue("汇总", dCell, cInt-eInt)
|
||||
if cInt-eInt == 0 {
|
||||
//本周压降为0但是当前遗留量为0
|
||||
if eInt == 0 {
|
||||
f.SetCellStyle("汇总", dCell, dCell, styleGreen)
|
||||
} else {
|
||||
//当前有遗留但是没压降量
|
||||
f.SetCellStyle("汇总", dCell, dCell, styleYellow)
|
||||
}
|
||||
}
|
||||
if cInt-eInt < 0 {
|
||||
f.SetCellStyle("汇总", dCell, dCell, styleRed)
|
||||
}
|
||||
if cInt-eInt > 0 {
|
||||
f.SetCellStyle("汇总", dCell, dCell, styleGreen)
|
||||
}
|
||||
}
|
||||
// Sum columns C:I and place the results in row 26
|
||||
for col := 'C'; col <= 'I'; col++ {
|
||||
//TODO
|
||||
sumCell := string(col) + "26"
|
||||
//TODO
|
||||
sumFormula := fmt.Sprintf("SUM(%s4:%s25)", string(col), string(col))
|
||||
f.SetCellFormula("汇总", sumCell, sumFormula)
|
||||
}
|
||||
|
||||
// Recalculate the sum for each cell to ensure it appears without manual intervention
|
||||
for col := 'C'; col <= 'I'; col++ {
|
||||
//TODO
|
||||
sumCell := string(col) + "26"
|
||||
value, err := f.CalcCellValue("汇总", sumCell)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
} else {
|
||||
f.SetCellValue("汇总", sumCell, cast.ToInt(value))
|
||||
}
|
||||
}
|
||||
//设置表头
|
||||
content := fmt.Sprintf("西湖智家光衰通报:%s", time.Now().Format("1月2日"))
|
||||
f.SetCellValue("汇总", "A1", content)
|
||||
|
||||
// Save the file
|
||||
save := filepath.Dir(open) + "/光衰通报(" + time.Now().Format("1月2日") + ").xlsx"
|
||||
if err := f.SaveAs(save); err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
logkit.Info("生成结束...")
|
||||
}
|
||||
@ -1,34 +0,0 @@
|
||||
package cryptokit
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/aes"
|
||||
"crypto/cipher"
|
||||
"encoding/base64"
|
||||
|
||||
"github.com/mizuki1412/go-core-kit/class/exception"
|
||||
)
|
||||
|
||||
// Encrypt 实现 AES-CBC 加密(返回 Base64 编码结果)
|
||||
func Encrypt(plainText string) string {
|
||||
key := "1234567890123456"
|
||||
iv := "1234567890123456"
|
||||
block, err := aes.NewCipher([]byte(key))
|
||||
if err != nil {
|
||||
panic(exception.New(err.Error()))
|
||||
}
|
||||
// PKCS7 填充
|
||||
paddedText := pkcs7Padding([]byte(plainText), block.BlockSize())
|
||||
// CBC 模式加密
|
||||
blockMode := cipher.NewCBCEncrypter(block, []byte(iv))
|
||||
ciphertext := make([]byte, len(paddedText))
|
||||
blockMode.CryptBlocks(ciphertext, paddedText)
|
||||
// Base64 编码
|
||||
return base64.StdEncoding.EncodeToString(ciphertext)
|
||||
}
|
||||
|
||||
func pkcs7Padding(ciphertext []byte, blockSize int) []byte {
|
||||
padding := blockSize - len(ciphertext)%blockSize
|
||||
padtext := bytes.Repeat([]byte{byte(padding)}, padding)
|
||||
return append(ciphertext, padtext...)
|
||||
}
|
||||
@ -1,43 +0,0 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
"github.com/mizuki1412/go-core-kit/service/configkit"
|
||||
)
|
||||
|
||||
// Header WMS-ZJ通用Header
|
||||
type Header struct {
|
||||
ContentType string `map:"Content-Type"`
|
||||
Cookie string `map:"Cookie"`
|
||||
UserAgent string `map:"User-Agent"`
|
||||
}
|
||||
|
||||
func NewHeader() *Header {
|
||||
header := new(Header)
|
||||
header.ContentType = "application/x-www-form-urlencoded; charset=UTF-8"
|
||||
header.Cookie = "JSESSIONID=" + configkit.GetString("wms.token", "")
|
||||
header.UserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"
|
||||
return header
|
||||
}
|
||||
|
||||
func (th *Header) GenReqParam() map[string]string {
|
||||
return th.structToMap()
|
||||
}
|
||||
|
||||
func (th *Header) structToMap() map[string]string {
|
||||
result := make(map[string]string)
|
||||
t := reflect.TypeOf(*th)
|
||||
v := reflect.ValueOf(*th)
|
||||
for i := 0; i < t.NumField(); i++ {
|
||||
field := t.Field(i)
|
||||
value := v.Field(i)
|
||||
// Use the tag value as the key in the map, if it exists; otherwise, use the field name.
|
||||
tag := field.Tag.Get("map")
|
||||
if tag == "" {
|
||||
tag = field.Name
|
||||
}
|
||||
result[tag] = value.String()
|
||||
}
|
||||
return result
|
||||
}
|
||||
@ -1,61 +0,0 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
model2 "cu-helper/internal/deprecated/wms/model"
|
||||
"time"
|
||||
|
||||
"github.com/go-resty/resty/v2"
|
||||
"github.com/mizuki1412/go-core-kit/class/exception"
|
||||
"github.com/tidwall/gjson"
|
||||
)
|
||||
|
||||
//获取光衰数据列表
|
||||
|
||||
// HighOptLossUnder 在途光衰单
|
||||
type HighOptLossUnder struct {
|
||||
Count int //所有在途单
|
||||
UnderCount int //施工中在途单
|
||||
ApplyCount int //人工回访在途单
|
||||
DurationOverSeven int
|
||||
DurationOverFifteen int
|
||||
Book int
|
||||
}
|
||||
|
||||
// ReqGetHighOptLossUnderList 查询在途光衰单(包含施工中、人工回访、综合调度等全部未归档状态)
|
||||
func ReqGetHighOptLossUnderList() map[string]*HighOptLossUnder {
|
||||
h := model2.NewHeader()
|
||||
header := h.GenReqParam()
|
||||
f := model2.NewGetHighOptLossUnderList()
|
||||
form := f.GenReqParam()
|
||||
client := resty.New().SetRetryCount(5).SetRetryWaitTime(10 * time.Second)
|
||||
resp, err := client.R().
|
||||
SetHeaders(header).SetFormData(form).Post("http://132.151.160.87:10010/wms-zj/gShuaiReply/gshuaiOrderReplyListAjax.do")
|
||||
if err != nil {
|
||||
panic(exception.New(err.Error()))
|
||||
}
|
||||
data := gjson.Get(resp.String(), "list").Array()
|
||||
m := make(map[string]*HighOptLossUnder)
|
||||
for _, v := range data {
|
||||
if m[v.Get("DEAL_MAN").String()] == nil {
|
||||
m[v.Get("DEAL_MAN").String()] = &HighOptLossUnder{}
|
||||
}
|
||||
m[v.Get("DEAL_MAN").String()].Count++
|
||||
if v.Get("STATUS_NAME").String() == "施工处理" {
|
||||
m[v.Get("DEAL_MAN").String()].UnderCount++
|
||||
duration := v.Get("TIMELONGS").Int()
|
||||
if duration >= 604800 {
|
||||
m[v.Get("DEAL_MAN").String()].DurationOverSeven++
|
||||
}
|
||||
if duration >= 1296000 {
|
||||
m[v.Get("DEAL_MAN").String()].DurationOverFifteen++
|
||||
}
|
||||
if v.Get("BOOK_TIME").String() != "" {
|
||||
m[v.Get("DEAL_MAN").String()].Book++
|
||||
}
|
||||
}
|
||||
if v.Get("STATUS_NAME").String() == "人工回访" {
|
||||
m[v.Get("DEAL_MAN").String()].ApplyCount++
|
||||
}
|
||||
}
|
||||
return m
|
||||
}
|
||||
Loading…
Reference in New Issue