You need to sign in or sign up before continuing.
Commit aa2ef175 by 陶腾飞

v2.6.7

parent a44fe036
...@@ -113,6 +113,7 @@ ...@@ -113,6 +113,7 @@
- 2022/07-31 v2.6.4 为支持windows激活添加功能 - 2022/07-31 v2.6.4 为支持windows激活添加功能
- 2022/07-31 v2.6.5 小工具支持批量执行命令 - 2022/07-31 v2.6.5 小工具支持批量执行命令
- 2022/08-18 v2.6.6 adct在开机时判断用户超时登录 - 2022/08-18 v2.6.6 adct在开机时判断用户超时登录
- 2023/11-17 v2.6.7 数据盘盘符更新,重启消息发送失败问题修复
## 四、其他说明 ## 四、其他说明
......
...@@ -28,6 +28,7 @@ const Dept_zw_qbbm_js_string = "技术" ...@@ -28,6 +28,7 @@ const Dept_zw_qbbm_js_string = "技术"
const Dept_zw_qbbm_jd_string = "京东" const Dept_zw_qbbm_jd_string = "京东"
const Dept_zw_qbbm_hw_string = "华为" const Dept_zw_qbbm_hw_string = "华为"
const Dept_zw_qbbm_dy_string = "抖音" const Dept_zw_qbbm_dy_string = "抖音"
const Dept_zw_qbbm_bd_string = "百度"
const Dept_zw_qbbm_bgyj_string = "报告研究中心" const Dept_zw_qbbm_bgyj_string = "报告研究中心"
const Dept_zw_qbbm_xmglwyh_string = "项目管理委员会" const Dept_zw_qbbm_xmglwyh_string = "项目管理委员会"
const Dept_zw_zztd = "郑州团队" const Dept_zw_zztd = "郑州团队"
...@@ -51,6 +52,7 @@ var Dept_zw_qbbm_map map[string]string = map[string]string{ ...@@ -51,6 +52,7 @@ var Dept_zw_qbbm_map map[string]string = map[string]string{
"克洛里斯Chloris(字)": Dept_zw_qbbm_zj_string, "克洛里斯Chloris(字)": Dept_zw_qbbm_zj_string,
"美杜莎Medusa(滴)": Dept_zw_qbbm_dd_string, "美杜莎Medusa(滴)": Dept_zw_qbbm_dd_string,
"普罗米修斯Prometheus": Dept_zw_qbbm_dy_string, "普罗米修斯Prometheus": Dept_zw_qbbm_dy_string,
"赫贝尔Hebe(度)": Dept_zw_qbbm_bd_string,
"雅典娜Athena(巨)": Dept_zw_qbbm_jl_string, "雅典娜Athena(巨)": Dept_zw_qbbm_jl_string,
"赫斯提亚Hestia(研)": Dept_zw_qbbm_bgyj_string, "赫斯提亚Hestia(研)": Dept_zw_qbbm_bgyj_string,
"宙斯Zeus": Dept_zw_jishu, "宙斯Zeus": Dept_zw_jishu,
...@@ -96,6 +98,8 @@ func GetPostationFromHostname(hostname string) (string, error) { ...@@ -96,6 +98,8 @@ func GetPostationFromHostname(hostname string) (string, error) {
return Cmdb_Position_7, nil return Cmdb_Position_7, nil
case HOST_Dept_DY: case HOST_Dept_DY:
return Cmdb_Position_7, nil return Cmdb_Position_7, nil
case HOST_Dept_BD:
return Cmdb_Position_7, nil
default: default:
return "", fmt.Errorf("%s 不是预定的情报部门的格式", hostname) return "", fmt.Errorf("%s 不是预定的情报部门的格式", hostname)
} }
......
...@@ -14,7 +14,7 @@ const SymbolDH = "、" ...@@ -14,7 +14,7 @@ const SymbolDH = "、"
// AD-Control // // AD-Control //
const Version string = "2.6.6" const Version string = "2.6.7"
const Host_adserver_lan string = "192.168.0.20" const Host_adserver_lan string = "192.168.0.20"
const Host_adserver_wan string = "115.231.214.234" const Host_adserver_wan string = "115.231.214.234"
const Host_adserver string = "ADSERVER" const Host_adserver string = "ADSERVER"
...@@ -59,9 +59,9 @@ const SMB_ADSoftPlus string = SMB_ADSoft + `plus\` ...@@ -59,9 +59,9 @@ const SMB_ADSoftPlus string = SMB_ADSoft + `plus\`
var Dir_tmp string = GetEnv("tmp") var Dir_tmp string = GetEnv("tmp")
const Dir_softlike string = `H:\software\softlike\` const Dir_softlike string = `D:\software\softlike\`
const Dir_application string = `H:\software\application\` const Dir_application string = `D:\software\application\`
const Dir_otherFile string = `H:\file\` const Dir_otherFile string = `D:\file\`
// application // // application //
const App_MultiSplit string = SMB_ADSoftOthTool + "win_MultiSplit.exe" const App_MultiSplit string = SMB_ADSoftOthTool + "win_MultiSplit.exe"
......
...@@ -146,6 +146,9 @@ func (rep *MJreport) MsgDeal() interface{} { ...@@ -146,6 +146,9 @@ func (rep *MJreport) MsgDeal() interface{} {
} }
case Msg_Report_TimeOutTurnOffPC: case Msg_Report_TimeOutTurnOffPC:
LOG(INFO, rep.Instruction, rep.Computername+" 超时关机") LOG(INFO, rep.Instruction, rep.Computername+" 超时关机")
if err := SendWXWrokTextToChatAccountManager(rep.Computername + " 超时关机"); err != nil {
LOG(ERROR, rep.Instruction, err.Error())
}
case Msg_Report_WillTurnOnPC: case Msg_Report_WillTurnOnPC:
switch rep.Status { switch rep.Status {
...@@ -341,7 +344,7 @@ func (rep *MJreport) MsgDeal() interface{} { ...@@ -341,7 +344,7 @@ func (rep *MJreport) MsgDeal() interface{} {
case Msg_Report_GetSoftlike: case Msg_Report_GetSoftlike:
switch rep.Status { switch rep.Status {
case Msg_status_commit: case Msg_status_commit:
f, err := GetFolderInFileName(`H:\software\softlike\`) f, err := GetFolderInFileName(`D:\software\softlike\`)
if err != nil { if err != nil {
LOG(ERROR, rep.Instruction, err) LOG(ERROR, rep.Instruction, err)
} }
...@@ -713,24 +716,31 @@ func (wxwork *MJwxwork) MsgDealSend() { ...@@ -713,24 +716,31 @@ func (wxwork *MJwxwork) MsgDealSend() {
} }
LOG(INFO, wxwork.Instruction, fmt.Sprintf("host:%s,name:%s", pc, wxwork.Name)) LOG(INFO, wxwork.Instruction, fmt.Sprintf("host:%s,name:%s", pc, wxwork.Name))
if err := RestartRemotePCForNow(pc); err != nil {
LOG(ERROR, wxwork.Instruction, err)
wxwork.SendText(Error_WXWork_Fail_ReTry)
return
}
Delay(10)
go func(name, userid string) { go func(name, userid string) {
for i := 0; i < 60; i++ {
s, _ := PSTest_Connection(pc)
if !s {
break
}
Delay(1)
}
for i := 0; i < 20; i++ { for i := 0; i < 20; i++ {
status, _ := PSTest_Connection(pc) s, _ := PSTest_Connection(pc)
if !status { if s {
wxwork.SendText("重启已完成~") wxwork.SendText("重启已完成~")
return return
} }
Delay(10) Delay(10)
} }
}(wxwork.Name, wxwork.UserID) }(wxwork.Name, wxwork.UserID)
if err := RestartRemotePCForNow(pc); err != nil {
LOG(ERROR, wxwork.Instruction, err)
wxwork.SendText(Error_WXWork_Fail_ReTry)
return
}
wxwork.Result = "开始重启,请等待~" wxwork.Result = "开始重启,请等待~"
// 电源管理 芝麻关机 // 电源管理 芝麻关机
......
...@@ -23,6 +23,7 @@ const HOST_Dept_BGYJ string = "BGYJ" ...@@ -23,6 +23,7 @@ const HOST_Dept_BGYJ string = "BGYJ"
const HOST_Dept_HW string = "HW" const HOST_Dept_HW string = "HW"
const HOST_Dept_JD string = "JD" const HOST_Dept_JD string = "JD"
const HOST_Dept_DY string = "DY" const HOST_Dept_DY string = "DY"
const HOST_Dept_BD string = "BD"
// os // os
const ( const (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment