You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
94 lines
4.1 KiB
94 lines
4.1 KiB
|
4 years ago
|
package quantification
|
||
|
|
|
||
|
|
import (
|
||
|
|
"github.com/flipped-aurora/gin-vue-admin/server/commonus"
|
||
|
|
"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
|
||
|
|
"github.com/flipped-aurora/gin-vue-admin/server/model/hrsystem"
|
||
|
|
"github.com/gin-gonic/gin"
|
||
|
|
)
|
||
|
|
|
||
|
|
type ApiGroup struct{}
|
||
|
|
|
||
|
|
//入口
|
||
|
|
func (a *ApiGroup) Index(c *gin.Context) {
|
||
|
|
outPut := commonus.MapOut()
|
||
|
|
response.Result(0, outPut, "手机量化考核入口", c)
|
||
|
|
}
|
||
|
|
|
||
|
|
//获取指标ID
|
||
|
|
type getTargetId[T any] struct {
|
||
|
|
TargetId []T `json:"targetid"` //指标
|
||
|
|
}
|
||
|
|
|
||
|
|
//定性考核查询参数
|
||
|
|
type natureParameter struct {
|
||
|
|
TargetId []string `json:"targetid"` //指标
|
||
|
|
Org []string `json:"org"` //行政组织
|
||
|
|
Year []string `json:"year"` //年
|
||
|
|
TimeAttribute TimeAttributeMap `json:"timeattribute"` //时间辅助
|
||
|
|
AccMethod []int `json:"accmethod"` //核算方式 1:合计值;2:平均值
|
||
|
|
AnalysisAngle int `json:"analysisangle"` //分析维度 1:行政组织;2:时间
|
||
|
|
}
|
||
|
|
|
||
|
|
//时间属性
|
||
|
|
type TimeAttributeMap struct {
|
||
|
|
Class int `json:"class"` //0:全年;1:半年;2:季度;3:月度
|
||
|
|
Time []int `json:"time"` //class->0(0),Time->1(1:上半年,2:下半年),class->2(1:第一季度,2:第二季度,3:第三季度,4:第四季度),class->3(1:1月....12:12月)
|
||
|
|
}
|
||
|
|
|
||
|
|
//组织架构
|
||
|
|
type orgModels struct {
|
||
|
|
Id string `json:"id"`
|
||
|
|
Name string `json:"name"`
|
||
|
|
Level int64 `json:level`
|
||
|
|
}
|
||
|
|
type orgModelsAry struct {
|
||
|
|
orgModels
|
||
|
|
Child []orgModels `json:"child"`
|
||
|
|
}
|
||
|
|
|
||
|
|
//查询指标数据流水
|
||
|
|
type flowLogDataList struct {
|
||
|
|
Id int64 `json:"id" gorm:"primaryKey;column:fld_id;type:bigint(20) unsigned;not null;comment:Id;index"`
|
||
|
|
EvaluationPlan int64 `json:"evaluationplan" gorm:"column:fld_evaluation_id;type:bigint(20) unsigned;default:0;not null;comment:考核方案项目ID"`
|
||
|
|
Key int64 `json:"key" gorm:"column:fld_flow_log;type:bigint(20) unsigned;default:0;not null;comment:识别标志"`
|
||
|
|
Score int64 `json:"score" gorm:"column:fld_score;type:bigint(20) unsigned;default:0;not null;comment:数据"`
|
||
|
|
|
||
|
|
EvaluationPlanFlow string `json:"evaluationplanflow" gorm:"column:fl_evaluation_id;type:mediumtext unsigned;default:0;not null;comment:考核方案项目ID"`
|
||
|
|
KeyFlow int64 `json:"keyflow" gorm:"column:fl_key;type:bigint(20) unsigned;default:0;not null;comment:识别标志"`
|
||
|
|
Year int64 `json:"year" gorm:"column:fl_year;type:int(7) unsigned;default:0;not null;comment:年分"`
|
||
|
|
Quarter int64 `json:"quarter" gorm:"column:fl_quarter;type:int(2) unsigned;default:0;not null;comment:季度"`
|
||
|
|
Month int64 `json:"month" gorm:"column:fl_month;type:int(2) unsigned;default:0;not null;comment:月"`
|
||
|
|
Week int64 `json:"week" gorm:"column:fl_week;type:int(5) unsigned;default:0;not null;comment:周"`
|
||
|
|
ToDay int64 `json:"today" gorm:"column:fl_day;type:int(5) unsigned;default:0;not null;comment:天"`
|
||
|
|
DutyGroup int64 `json:"dutygroup" gorm:"column:fl_duty_group;type:bigint(20) unsigned;default:0;not null;comment:职责集团"`
|
||
|
|
DutyDepartment int64 `json:"dutydepartment" gorm:"column:fl_duty_department;type:bigint(20) unsigned;default:0;not null;comment:职责部门"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type OutGovCont struct {
|
||
|
|
hrsystem.AdministrativeOrganization
|
||
|
|
ClassName string `json:"classname" gorm:"column:classname;type:varchar(255) unsigned;default:'';not null;comment:行政组织分类名称"`
|
||
|
|
Level int64 `json:"level" gorm:"column:level;type:int(5) unsigned;default:1;not null;comment:级别"`
|
||
|
|
}
|
||
|
|
|
||
|
|
//时间维度构造
|
||
|
|
type TimeFrame struct {
|
||
|
|
XLine string `json:"xline"`
|
||
|
|
YearName string `json:"yearname"`
|
||
|
|
Class int `json:"class"`
|
||
|
|
Where []int `json:"where"`
|
||
|
|
}
|
||
|
|
|
||
|
|
//时间维度输出构造
|
||
|
|
type GraphicStatistics struct {
|
||
|
|
XLine []string `json:"xAxis"` //x轴维度
|
||
|
|
Cylindrical []string `json:"legend"` //柱形体名称集合
|
||
|
|
CylindricalData []series `json:"series"` //柱形体数值集合
|
||
|
|
}
|
||
|
|
|
||
|
|
//数值结构体
|
||
|
|
type series struct {
|
||
|
|
Name string `json:"name"` //柱形体名称
|
||
|
|
Data []float64 `json:"data"` //对应X轴点位数值
|
||
|
|
}
|