chore: 并入 iotlcm-upstream-chan 历史到 upstream-chan/(原提交 1e74497)

This commit is contained in:
MiFaZhan
2026-11-02 13:28:02 +08:00
192 changed files with 33119 additions and 0 deletions
@@ -0,0 +1,36 @@
package upstreamimpl
import (
"strings"
"git.5iot.com/iotlcm-public/iotlcm-upstream-chan/internal/model"
)
func dxSessionAccessMode(netModel string, accessType string) string {
switch strings.TrimSpace(netModel) {
case "1":
return "4G"
case "2":
return "5G"
default:
return strings.TrimSpace(accessType)
}
}
func dxNetworkBlockStatus(name string, types []model.SimNetBlockType) *string {
var status string
switch strings.TrimSpace(name) {
case "未断网":
status = "0"
case "已断网":
status = "1"
default:
return nil
}
for _, item := range types {
blockType := strings.TrimSpace(item.BlockType)
if (status == "0" && blockType != "" && blockType != "0") || (status == "1" && blockType == "0") {
return nil
}
}
return &status
}