diff --git a/example/admin/init.go b/example/admin/init.go index 071c051..ac027fd 100644 --- a/example/admin/init.go +++ b/example/admin/init.go @@ -5,7 +5,7 @@ import ( . "../../../hotime/common" ) -var ID = "a6467964bfe64def9cd247c226e6d49b" +var ID = "002842c27c0a29c2109f3b726c130e65" // Project 管理端项目 var Project = Proj{ diff --git a/example/app/material_inout.go b/example/app/material_inout.go index 98a644c..9a4d471 100644 --- a/example/app/material_inout.go +++ b/example/app/material_inout.go @@ -59,6 +59,15 @@ var material_inoutCtr = Ctr{ count = -count } + produce_material := that.Db.Get("produce_material", "id", Map{"AND": Map{"produce_id": produceId, "material_id": materialId}}) + if produce_material == nil { + that.Db.Insert("produce_material", Map{"produce_id": produceId, + "create_time": time.Now().Unix(), + "modify_time": time.Now().Unix(), + "admin_id": adminID, + "material_id": materialId}) + } + that.Db.Update("material", Map{"count[#]": "count+" + ObjToStr(count), "saved[#]": "saved+" + ObjToStr(count)}, Map{"id": materialId}) material := that.Db.Get("material", "*", Map{"id": materialId}) data := Map{ diff --git a/example/config/app.json b/example/config/app.json index 2937813..57f43ea 100644 --- a/example/config/app.json +++ b/example/config/app.json @@ -1,5 +1,5 @@ { - "id": "a6467964bfe64def9cd247c226e6d49b", + "id": "002842c27c0a29c2109f3b726c130e65", "label": "HoTime管理平台", "menus": [ { @@ -54,6 +54,14 @@ "label": "生产成品", "table": "produce_product" }, + { + "label": "生产计划", + "table": "produce" + }, + { + "label": "生产计划", + "table": "produce" + }, { "label": "生产计划", "table": "produce" @@ -81,6 +89,14 @@ "label": "抽检管理", "table": "product_spot_check" }, + { + "label": "成品管理", + "table": "product" + }, + { + "label": "成品管理", + "table": "product" + }, { "label": "成品管理", "table": "product" @@ -100,6 +116,14 @@ "label": "出入库管理", "table": "material_inout" }, + { + "label": "原材料管理", + "table": "material" + }, + { + "label": "原材料管理", + "table": "material" + }, { "label": "原材料管理", "table": "material" @@ -1383,6 +1407,14 @@ } ], "type": "select" + }, + { + "label": "经办人", + "link": "admin", + "name": "admin_id", + "sortable": true, + "type": "number", + "value": "name" } ], "label": "消耗原材料", diff --git a/example/config/config.json b/example/config/config.json index ecb3ab6..ef79327 100644 --- a/example/config/config.json +++ b/example/config/config.json @@ -24,7 +24,7 @@ "db": { "mysql": { "host": "192.168.6.253", - "name": "myhs_remote", + "name": "myhs", "password": "dasda8454456", "port": "3306", "prefix": "", diff --git a/example/myhs.exe b/example/myhs.exe index d1f141f..175be97 100644 Binary files a/example/myhs.exe and b/example/myhs.exe differ