Commit aa2ef175 by 陶腾飞

v2.6.7

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