diff --git a/Document/大数据数据仓库整体架构设计.pdf b/Document/大数据数据仓库整体架构设计.pdf new file mode 100644 index 00000000..b75a4c9a Binary files /dev/null and b/Document/大数据数据仓库整体架构设计.pdf differ diff --git a/Document/大数据数据仓库整体架构设计.vsdx b/Document/大数据数据仓库整体架构设计.vsdx new file mode 100644 index 00000000..b5a2890f Binary files /dev/null and b/Document/大数据数据仓库整体架构设计.vsdx differ diff --git a/Logs/dsSupport.log b/Logs/dsSupport.log index 95f26b84..be1106f6 100644 --- a/Logs/dsSupport.log +++ b/Logs/dsSupport.log @@ -59,3 +59,80 @@ [Error]2020/09/01 14:25:08 SqlQueryError Error 1054: Unknown column 'id' in 'field list' [Error]2020/09/01 14:25:45 SqlQueryError Error 1054: Unknown column 'id' in 'field list' [Error]2020/09/01 14:25:45 SqlQueryError Error 1054: Unknown column 'id' in 'field list' +[Error]2020/09/01 14:45:55 SqlQueryError Error 1054: Unknown column 'id' in 'field list' +[Error]2020/09/01 14:45:55 SqlQueryError Error 1054: Unknown column 'id' in 'field list' +[Error]2020/09/01 15:20:34 SqlUpdateError 接入系统authToken Update,数据库操作发生严重错误:Params type error +[Error]2020/09/01 15:24:43 SqlQueryError Error 1054: Unknown column 'id' in 'field list' +[Error]2020/09/01 15:24:43 SqlQueryError Error 1054: Unknown column 'id' in 'field list' +[Error]2020/09/01 15:27:48 SqlQueryError Error 1054: Unknown column 'id' in 'field list' +[Error]2020/09/01 15:27:48 SqlQueryError Error 1054: Unknown column 'id' in 'field list' +[Error]2020/09/01 15:28:22 SqlQueryError Error 1054: Unknown column 'id' in 'field list' +[Error]2020/09/01 15:28:22 SqlQueryError Error 1054: Unknown column 'id' in 'field list' +[Error]2020/09/01 15:30:22 SqlQueryError Error 1054: Unknown column 'id' in 'field list' +[Error]2020/09/01 15:30:22 SqlQueryError Error 1054: Unknown column 'id' in 'field list' +[Error]2020/09/01 15:39:09 SqlQueryError Error 1054: Unknown column 'id' in 'field list' +[Error]2020/09/01 15:39:09 SqlQueryError Error 1054: Unknown column 'id' in 'field list' +[Error]2020/09/01 15:41:46 SqlUpdateError 接入系统authToken Update,数据库操作发生严重错误:Error 1364: Field 'dic_value' doesn't have a default value +[Error]2020/09/01 15:42:29 SqlUpdateError 接入系统authToken Update,数据库操作发生严重错误:Error 1364: Field 'dic_value' doesn't have a default value +[Error]2020/09/01 15:42:42 SqlUpdateError 接入系统authToken Update,数据库操作发生严重错误:Error 1364: Field 'dic_value' doesn't have a default value +[Error]2020/09/01 15:44:09 SqlUpdateError 接入系统authToken Update,数据库操作发生严重错误:Error 1364: Field 'dic_value' doesn't have a default value +[Error]2020/09/01 15:45:10 SqlUpdateError 接入系统authToken Update,数据库操作发生严重错误:Error 1364: Field 'dic_value' doesn't have a default value +[Error]2020/09/01 15:52:04 SqlQueryError Error 1054: Unknown column 'id' in 'field list' +[Error]2020/09/01 15:52:04 SqlQueryError Error 1054: Unknown column 'id' in 'field list' +[Error]2020/09/01 15:57:41 SqlQueryError Error 1054: Unknown column 'id' in 'field list' +[Error]2020/09/01 15:57:41 SqlQueryError Error 1054: Unknown column 'id' in 'field list' +[Error]2020/09/01 15:59:41 SqlQueryError Error 1054: Unknown column 'id' in 'field list' +[Error]2020/09/01 15:59:41 SqlQueryError Error 1054: Unknown column 'id' in 'field list' +[Error]2020/09/01 16:04:12 SqlQueryError Error 1054: Unknown column 'id' in 'field list' +[Error]2020/09/01 16:04:12 SqlQueryError Error 1054: Unknown column 'id' in 'field list' +[Error]2020/09/01 16:04:41 SqlQueryError Error 1054: Unknown column 'id' in 'field list' +[Error]2020/09/01 16:04:41 SqlQueryError Error 1054: Unknown column 'id' in 'field list' +[Error]2020/09/01 16:18:54 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:18:54 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:18:54 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:20:53 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:20:53 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:20:53 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:22:44 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:22:44 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:22:44 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:23:26 SqlQueryError Error 1054: Unknown column 'id' in 'field list' +[Error]2020/09/01 16:26:09 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:26:09 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:26:09 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:26:34 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:26:34 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:26:34 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:31:48 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:31:48 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:31:48 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:32:06 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:32:06 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:32:06 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:33:57 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:33:57 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:33:57 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:35:37 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:35:37 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:35:37 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:36:00 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:36:00 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:36:00 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:38:16 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:38:16 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:38:16 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:38:24 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:38:24 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:38:24 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:49:17 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:49:17 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:49:17 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:49:17 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:49:17 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:49:17 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:55:14 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:55:14 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:55:14 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:55:14 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:55:14 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:55:14 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value diff --git a/dsBaseRpc/RpcService/BaseTeacher/BaseTeacherService/BaseTeacherService.go b/dsBaseRpc/RpcService/BaseTeacher/BaseTeacherService/BaseTeacherService.go index ee985c67..eb240c64 100644 --- a/dsBaseRpc/RpcService/BaseTeacher/BaseTeacherService/BaseTeacherService.go +++ b/dsBaseRpc/RpcService/BaseTeacher/BaseTeacherService/BaseTeacherService.go @@ -19,7 +19,6 @@ import ( "dsBaseRpc/Utils/PinYinUtil" "dsBaseRpc/Utils/SqlKit" "dsBaseRpc/models" - "encoding/json" "fmt" ) @@ -61,15 +60,15 @@ func (s *Rpc) GetBaseTeacher(ctx context.Context, in *BaseTeacherProto.ModelArg) LogUtil.Error(ErrorConst.SqlQueryError, "执行GetPositionInfoByPersonIdAndBureauId时发生严重错误:"+err.Error()) return &reply, err } - //转换数组为JSON数据格式 - b, err := json.Marshal(positionArray) - if err != nil { - reply.Success = false - reply.Message = Const.DataBaseActionError - LogUtil.Error(ErrorConst.SqlQueryError, "执行positionArray转JSON时发生严重错误:"+err.Error()) - return &reply, err - } - list[0]["position_id_array"] = string(b) + ////转换数组为JSON数据格式 + //b, err := json.Marshal(positionArray) + //if err != nil { + // reply.Success = false + // reply.Message = Const.DataBaseActionError + // LogUtil.Error(ErrorConst.SqlQueryError, "执行positionArray转JSON时发生严重错误:"+err.Error()) + // return &reply, err + //} + list[0]["position_id_array"] = positionArray } } //将结果序列化 diff --git a/dsSupport/MyModel/DataAccess/DataaccessDAO/DataaccessDAO.go b/dsSupport/MyModel/DataAccess/DataaccessDAO/DataaccessDAO.go index 02350ca7..07527b5a 100644 --- a/dsSupport/MyModel/DataAccess/DataaccessDAO/DataaccessDAO.go +++ b/dsSupport/MyModel/DataAccess/DataaccessDAO/DataaccessDAO.go @@ -24,28 +24,31 @@ func GetDataaccessResults(query MySwagger.DataaccessQuery) (bool, string, int32, list, count, _ := CacheUtil.Page(sql, 100, query.Page) listJson, _ :=json.Marshal(list) - sql = "SELECT id FROM t_dataex_datasource WHERE 1 = 1" - joinList, _, _ := CacheUtil.Page(sql, 10000, 1) - joinListJson, _ := json.Marshal(joinList) + sql1 := "SELECT id FROM t_dataex_datasource WHERE 1 = 1" + joinList1, _, _ := CacheUtil.Page(sql1, 10000, 0) + joinListJson1, _ := json.Marshal(joinList1) + mergedList1 := CommonUtil.ListMerge(string(listJson), string(joinListJson1), "datasource_id", "id", "source_systemid", "system_id") - mergedList := CommonUtil.ListMerge(string(listJson), string(joinListJson), "datasource_id", "id", "source_systemid", "system_id") + sql2 := "SELECT id FROM t_dataex_datasource WHERE 1 = 1" + joinList2, _, _ := CacheUtil.Page(sql2, 10000, 0) + joinListJson2, _ := json.Marshal(joinList2) + mergedList2 := CommonUtil.ListMerge(mergedList1, string(joinListJson2), "datasource_id", "id", "datasource_name", "datasource_name") - sql = "SELECT id FROM t_app_base WHERE 1 = 1" - joinList, _, _ = CacheUtil.Page(sql, 10000, 1) - joinListJson, _ = json.Marshal(joinList) + sql3 := "SELECT app_id FROM t_app_base WHERE 1 = 1" + joinList3, _, _ := CacheUtil.Page(sql3, 10000, 0) + joinListJson3, _ := json.Marshal(joinList3) + mergedList3 := CommonUtil.ListMerge(mergedList2, string(joinListJson3), "source_systemid", "app_id", "source_systemname", "app_name") - mergedList = CommonUtil.ListMerge(mergedList, string(joinListJson), "system_id", "app_id", "source_systemname", "app_name") + sql4 := "SELECT app_id FROM t_app_base WHERE 1 = 1" + joinList4, _, _ := CacheUtil.Page(sql4, 10000, 0) + joinListJson4, _ := json.Marshal(joinList4) + mergedList4 := CommonUtil.ListMerge(mergedList3, string(joinListJson4), "consume_systemid", "app_id", "consume_systemname", "app_name") - sql = "SELECT id FROM t_app_base WHERE 1 = 1" - joinList, _, _ = CacheUtil.Page(sql, 10000, 1) - joinListJson, _ = json.Marshal(joinList) - - mergedList = CommonUtil.ListMerge(mergedList, string(joinListJson), " consume_systemid", "app_id", "consume_systemname", "app_name") - fmt.Println(mergedList) + fmt.Println(mergedList4) var datas []map[string]interface{} - json.Unmarshal([]byte(mergedList), &datas) + json.Unmarshal([]byte(mergedList4), &datas) fmt.Println(datas) diff --git a/dsSupport/MyModel/JYT2012/Jyt2012Service/Jyt2012Service.go b/dsSupport/MyModel/JYT2012/Jyt2012Service/Jyt2012Service.go index 547e177b..e7b30a73 100644 --- a/dsSupport/MyModel/JYT2012/Jyt2012Service/Jyt2012Service.go +++ b/dsSupport/MyModel/JYT2012/Jyt2012Service/Jyt2012Service.go @@ -21,6 +21,9 @@ func GetJyt2012Results(swag MySwagger.Jyt2012Swag) (bool, string, int32, []map[s if swag.DicName != "" { conditions = append(conditions, "dic_name="+"'"+html.EscapeString(swag.DicName)+"'") } + if swag.DicValue != "" { + conditions = append(conditions, "dic_value="+"'"+html.EscapeString(swag.DicValue)+"'") + } if swag.DicType != 0 { conditions = append(conditions, "dic_type="+"'"+strconv.Itoa(swag.DicType)+"'") } @@ -65,6 +68,7 @@ func CreateJyt2012(model models.TDataexJyt2012) (bool, string, error) { business := new(models.TDataexJyt2012) business.Id = CommonUtil.GetUUID() business.DicName = html.EscapeString(model.DicName) + business.DicValue = html.EscapeString(model.DicValue) business.DicType = model.DicType business.DicInfo = html.EscapeString(model.DicInfo) business.RootFlag = model.RootFlag diff --git a/dsSupport/MyModel/MySwagger/Jyt2012Swag.go b/dsSupport/MyModel/MySwagger/Jyt2012Swag.go index 4479a7bb..f1be9e22 100644 --- a/dsSupport/MyModel/MySwagger/Jyt2012Swag.go +++ b/dsSupport/MyModel/MySwagger/Jyt2012Swag.go @@ -14,6 +14,7 @@ import "time" type Jyt2012Swag struct { Id string `json:"id" xorm:"not null pk comment('ID') VARCHAR(36)"` DicName string `json:"dic_name" xorm:"not null comment('字典/字典项名称') VARCHAR(100)"` + DicValue string `json:"dic_name" xorm:"not null comment('字典/字典项值') VARCHAR(100)"` DicType int `json:"dic_type" xorm:"not null default 1 comment('字典类型【1:国标数据、关联数据源,2:国标字典、关联元数据】') INT(11)"` DicInfo string `json:"dic_info" xorm:"default ''NULL'' comment('字典相信说明') VARCHAR(500)"` RootFlag int `json:"root_flag" xorm:"not null default -1 comment('是否是字典【1:是,-1:否】') INT(11)"` diff --git a/dsSupport/models/t_dataex_jyt2012.go b/dsSupport/models/t_dataex_jyt2012.go index 901c6f82..8a8e1cbb 100644 --- a/dsSupport/models/t_dataex_jyt2012.go +++ b/dsSupport/models/t_dataex_jyt2012.go @@ -7,6 +7,7 @@ import ( type TDataexJyt2012 struct { Id string `json:"id" xorm:"not null pk comment('ID') VARCHAR(36)"` DicName string `json:"dic_name" xorm:"not null comment('字典/字典项名称') VARCHAR(100)"` + DicValue string `json:"dic_value" xorm:"not null comment('字典/字典项值') VARCHAR(100)"` DicType int `json:"dic_type" xorm:"not null default 1 comment('字典类型【1:国标数据、关联数据源,2:国标字典、关联元数据】') INT(11)"` DicInfo string `json:"dic_info" xorm:"default ''NULL'' comment('字典相信说明') VARCHAR(500)"` RootFlag int `json:"root_flag" xorm:"not null default -1 comment('是否是字典【1:是,-1:否】') INT(11)"`