初步完成

This commit is contained in:
hoteas 2022-03-28 01:14:09 +08:00
parent fec195b3a1
commit 38d3d77c59
3 changed files with 677 additions and 113 deletions

View File

@ -1,5 +1,5 @@
{
"id": "64ca196b86ad0201f85acc22b5269830",
"id": "f8350c6049369d77d9e9d17c7a516c44",
"label": "HoTime管理平台",
"menus": [
{
@ -66,6 +66,22 @@
{
"label": "项目管理",
"table": "proj"
},
{
"label": "标签管理",
"table": "visit_tag"
},
{
"label": "标签管理",
"table": "out_tag"
},
{
"label": "车辆管理",
"table": "car"
},
{
"label": "用章管理",
"table": "seal_tag"
}
],
"name": "sys"
@ -251,6 +267,121 @@
],
"table": "admin"
},
"car": {
"auth": [
"show",
"add",
"delete",
"edit",
"info"
],
"columns": [
{
"add": false,
"edit": false,
"label": "ID",
"name": "id",
"sortable": true,
"type": "number"
},
{
"label": "名称",
"name": "name",
"type": "text"
},
{
"add": false,
"edit": false,
"label": "创建时间",
"list": false,
"name": "create_time",
"type": "time"
},
{
"add": false,
"edit": false,
"label": "变更时间",
"name": "modify_time",
"type": "time"
},
{
"label": "状态",
"name": "state",
"options": [
{
"name": "已启用",
"value": "0"
},
{
"name": "未启用",
"value": "1"
},
{
"name": "异常",
"value": "2"
}
],
"type": "select"
},
{
"label": "描述",
"list": false,
"name": "description",
"type": "text"
},
{
"label": "车牌号码",
"name": "sn",
"type": "text"
}
],
"label": "车辆管理",
"search": [
{
"label": "请输入关键词",
"name": "keyword",
"type": "search",
"value": null
},
{
"label": "时间段",
"name": "daterange",
"type": "search",
"value": null
},
{
"label": "排序",
"name": "sort",
"type": "search",
"value": null
},
{
"label": "状态",
"name": "state",
"options": [
{
"name": "已启用",
"value": "0"
},
{
"name": "未启用",
"value": "1"
},
{
"name": "异常",
"value": "2"
},
{
"name": "全部",
"value": null
}
],
"type": "select",
"value": null
}
],
"table": "car"
},
"category": {
"auth": [
"show",
@ -1619,6 +1750,116 @@
],
"table": "org"
},
"out_tag": {
"auth": [
"show",
"add",
"delete",
"edit",
"info"
],
"columns": [
{
"add": false,
"edit": false,
"label": "ID",
"name": "id",
"sortable": true,
"type": "number"
},
{
"label": "名称",
"name": "name",
"type": "text"
},
{
"add": false,
"edit": false,
"label": "创建时间",
"list": false,
"name": "create_time",
"type": "time"
},
{
"add": false,
"edit": false,
"label": "变更时间",
"name": "modify_time",
"type": "time"
},
{
"label": "状态",
"name": "state",
"options": [
{
"name": "已启用",
"value": "0"
},
{
"name": "未启用",
"value": "1"
},
{
"name": "异常",
"value": "2"
}
],
"type": "select"
},
{
"label": "描述",
"list": false,
"name": "description",
"type": "text"
}
],
"label": "标签管理",
"search": [
{
"label": "请输入关键词",
"name": "keyword",
"type": "search",
"value": null
},
{
"label": "时间段",
"name": "daterange",
"type": "search",
"value": null
},
{
"label": "排序",
"name": "sort",
"type": "search",
"value": null
},
{
"label": "状态",
"name": "state",
"options": [
{
"name": "已启用",
"value": "0"
},
{
"name": "未启用",
"value": "1"
},
{
"name": "异常",
"value": "2"
},
{
"name": "全部",
"value": null
}
],
"type": "select",
"value": null
}
],
"table": "out_tag"
},
"proj": {
"auth": [
"show",
@ -2251,6 +2492,116 @@
],
"table": "role"
},
"seal_tag": {
"auth": [
"show",
"add",
"delete",
"edit",
"info"
],
"columns": [
{
"add": false,
"edit": false,
"label": "ID",
"name": "id",
"sortable": true,
"type": "number"
},
{
"label": "名称",
"name": "name",
"type": "text"
},
{
"add": false,
"edit": false,
"label": "创建时间",
"list": false,
"name": "create_time",
"type": "time"
},
{
"add": false,
"edit": false,
"label": "变更时间",
"name": "modify_time",
"type": "time"
},
{
"label": "状态",
"name": "state",
"options": [
{
"name": "已启用",
"value": "0"
},
{
"name": "未启用",
"value": "1"
},
{
"name": "异常",
"value": "2"
}
],
"type": "select"
},
{
"label": "描述",
"list": false,
"name": "description",
"type": "text"
}
],
"label": "用章管理",
"search": [
{
"label": "请输入关键词",
"name": "keyword",
"type": "search",
"value": null
},
{
"label": "时间段",
"name": "daterange",
"type": "search",
"value": null
},
{
"label": "排序",
"name": "sort",
"type": "search",
"value": null
},
{
"label": "状态",
"name": "state",
"options": [
{
"name": "已启用",
"value": "0"
},
{
"name": "未启用",
"value": "1"
},
{
"name": "异常",
"value": "2"
},
{
"name": "全部",
"value": null
}
],
"type": "select",
"value": null
}
],
"table": "seal_tag"
},
"system": {
"auth": [
"show",
@ -2766,6 +3117,38 @@
"sortable": true,
"type": "number",
"value": "name"
},
{
"label": "拜访方式",
"link": "visit_tag",
"name": "visit_tag_id",
"sortable": true,
"type": "number",
"value": "name"
},
{
"label": "外出方式",
"link": "out_tag",
"name": "out_tag_id",
"sortable": true,
"type": "number",
"value": "name"
},
{
"label": "车辆",
"link": "car",
"name": "car_id",
"sortable": true,
"type": "number",
"value": "name"
},
{
"label": "印章",
"link": "seal_tag",
"name": "seal_tag_id",
"sortable": true,
"type": "number",
"value": "name"
}
],
"label": "任务管理",
@ -3271,6 +3654,38 @@
"list": false,
"name": "files",
"type": "file"
},
{
"label": "拜访方式",
"link": "visit_tag",
"name": "visit_tag_id",
"sortable": true,
"type": "number",
"value": "name"
},
{
"label": "外出类型",
"link": "out_tag",
"name": "out_tag_id",
"sortable": true,
"type": "number",
"value": "name"
},
{
"label": "车辆",
"link": "car",
"name": "car_id",
"sortable": true,
"type": "number",
"value": "name"
},
{
"label": "印章",
"link": "seal_tag",
"name": "seal_tag_id",
"sortable": true,
"type": "number",
"value": "name"
}
],
"label": "任务执行",
@ -3608,6 +4023,11 @@
"sortable": true,
"type": "number",
"value": "name"
},
{
"label": "职位",
"name": "position",
"type": "text"
}
],
"label": "客户管理",
@ -3657,6 +4077,116 @@
],
"table": "user"
},
"visit_tag": {
"auth": [
"show",
"add",
"delete",
"edit",
"info"
],
"columns": [
{
"add": false,
"edit": false,
"label": "ID",
"name": "id",
"sortable": true,
"type": "number"
},
{
"label": "名称",
"name": "name",
"type": "text"
},
{
"add": false,
"edit": false,
"label": "创建时间",
"list": false,
"name": "create_time",
"type": "time"
},
{
"add": false,
"edit": false,
"label": "变更时间",
"name": "modify_time",
"type": "time"
},
{
"label": "状态",
"name": "state",
"options": [
{
"name": "已启用",
"value": "0"
},
{
"name": "未启用",
"value": "1"
},
{
"name": "异常",
"value": "2"
}
],
"type": "select"
},
{
"label": "描述",
"list": false,
"name": "description",
"type": "text"
}
],
"label": "标签管理",
"search": [
{
"label": "请输入关键词",
"name": "keyword",
"type": "search",
"value": null
},
{
"label": "时间段",
"name": "daterange",
"type": "search",
"value": null
},
{
"label": "排序",
"name": "sort",
"type": "search",
"value": null
},
{
"label": "状态",
"name": "state",
"options": [
{
"name": "已启用",
"value": "0"
},
{
"name": "未启用",
"value": "1"
},
{
"name": "异常",
"value": "2"
},
{
"name": "全部",
"value": null
}
],
"type": "select",
"value": null
}
],
"table": "visit_tag"
},
"wechat": {
"auth": [
"show",

View File

@ -119,7 +119,6 @@ func main() {
taskAdminID := that.RouterString[2]
taskAdmin := that.Db.Get("task_admin", "*", Map{"id": taskAdminID})
taskAdminStatus := taskAdmin.GetCeilInt64("status")
that.Log["task_id"] = taskAdmin.GetCeilInt("task_id")
@ -182,7 +181,6 @@ func main() {
}
}
if that.HandlerStr == "/app/task" && that.Req.Method == "POST" {
that.RespFunc = func() {
if that.RespData["status"] != nil && that.RespData.GetCeilInt64("status") == 0 {
@ -190,7 +188,7 @@ func main() {
approverData := ObjToMap(that.Req.FormValue("approver_data"))
readerData := ObjToMap(that.Req.FormValue("reader_data"))
taskId := that.RespData.GetCeilInt("result")
task:= that.Db.Get("task","admin_id,name,create_time,modify_time,state,company_id,proj_id,reward,reward_money,reward_description,type,zone_id,extend_data,city_id,status,user_id,zone_id",Map{"id":taskId})
task := that.Db.Get("task", "admin_id,name,create_time,modify_time,state,company_id,proj_id,reward,reward_money,reward_description,type,zone_id,extend_data,city_id,status,user_id,zone_id,out_tag_id,visit_tag_id,car_id,seal_tag_id", Map{"id": taskId})
task["task_id"] = taskId
that.Log["task_id"] = taskId
@ -252,6 +250,42 @@ func main() {
}
}
if task.GetCeilInt("type") != 0 {
//that.Db.Update("task",Map{"status":2},Map{"id":taskId})
if executorData == nil {
task["admin_id"] = adminId
task["role"] = 3
//task["status"]=2
that.Db.Insert("task_admin", task)
} else {
//that.Db.Update("task_admin",Map{"status":2},Map{"task_id":taskId})
}
admin := that.Db.Get("admin", "org_id", Map{"id": adminId})
org := that.Db.Get("org", "index", Map{"id": admin.GetCeilInt64("org_id")})
orgstr := strings.Split(org.GetString("index"), ",")
orgs := Slice{}
for _, v := range orgstr {
if v != "" && v != ObjToStr(admin.GetCeilInt64("org_id")) {
orgs = append(orgs, v)
}
}
if len(orgs) != 0 {
admins := that.Db.Select("admin", "id", Map{"org_id": orgs})
for _, v := range admins {
task["admin_id"] = v.GetCeilInt("id")
task["role"] = 2
//task["status"]=2
that.Db.Insert("task_admin", task)
}
}
}
}
}
}

Binary file not shown.