@ -3,36 +3,36 @@ package assessment
import (
"sync"
"github.com/flipped-aurora/gin-vue-admin/server /commonus"
"github.com/flipped-aurora/gin-vue-admin/server /model/assessmentmodel"
"gin_server_admin /commonus"
"gin_server_admin /model/assessmentmodel"
)
//协程设置
// 协程设置
var syncProcess = sync . WaitGroup { }
//数据锁统计
// 数据锁统计
type dataLockStatistics struct {
dataMap [ ] map [ string ] interface { }
dataErrMap [ ] map [ string ] interface { }
mutext sync . RWMutex
}
//读取锁数据
// 读取锁数据
func ( d * dataLockStatistics ) readMyDayData ( ) ( [ ] map [ string ] interface { } , [ ] map [ string ] interface { } ) {
d . mutext . RLock ( )
defer d . mutext . RUnlock ( )
return d . dataMap , d . dataErrMap
}
//职责考核
// 职责考核
type DutyHandle struct { }
//字符串ID
// 字符串ID
type OutIdStruct struct {
OutId string ` json:"outId" `
}
//职责类别查询参数
// 职责类别查询参数
type dutyClassRequest struct {
commonus . PageSetLimt
OutIdStruct
@ -40,34 +40,34 @@ type dutyClassRequest struct {
State int ` json:"state" `
}
//职责类别输出
// 职责类别输出
type dutyClassOutput struct {
assessmentmodel . DutyClass
OutIdStruct
IsTrue int ` json:"istrue" `
}
//职责类别添加
// 职责类别添加
type dutyClassAdd struct {
Title string ` json:"title" `
Type int ` json:"type" ` //1:定性考核;2:定量考核
Sort int ` json:"sort" `
}
//职责类别修改
// 职责类别修改
type dutyClassEite struct {
commonus . SetId
dutyClassAdd
}
//状态修改
// 状态修改
type dutyClassState struct {
commonus . SetId
State int ` json:"state" ` // 状态
IsDel int ` json:"isdel" ` // 是否强制删除
}
//考核项目查询参数
// 考核项目查询参数
type assessRequest struct {
commonus . PageSetLimt
ParentId string ` json:"parentId" ` //父级
@ -75,7 +75,7 @@ type assessRequest struct {
State int ` json:"state" `
}
//考核项目输出
// 考核项目输出
type assessOutput struct {
assessmentmodel . AssessMentitems
OutIdStruct
@ -83,7 +83,7 @@ type assessOutput struct {
ParentTitle string ` json:"parentTitle" `
}
//添加考核项目内容
// 添加考核项目内容
type addAssEssInfo struct {
dutyClassAdd
Content string ` json:"content" ` //描述
@ -94,7 +94,7 @@ type addAssEssInfo struct {
CycleAttr int ` json:"cycleattr" ` //辅助计数
}
//修改考核项目内容
// 修改考核项目内容
type eiteAssEssCont struct {
commonus . SetId
dutyClassAdd
@ -106,7 +106,7 @@ type eiteAssEssCont struct {
CycleAttr int ` json:"cycleattr" ` //辅助计数
}
//具体职责查询
// 具体职责查询
type dutyRequest struct {
commonus . PageSetLimt
ParentId string ` json:"parentId" ` //父级
@ -116,7 +116,7 @@ type dutyRequest struct {
AssEssUserId string ` json:"assessuserid" `
}
//具体职责输出
// 具体职责输出
type dutyOutput struct {
assessmentmodel . DutyContent
OutIdStruct
@ -133,7 +133,7 @@ type dutyOutput struct {
Content string ` json:"contenting" ` //描述
}
//添加具体职责
// 添加具体职责
type addDutyContent struct {
dutyClassAdd
Type int ` json:"type" ` //1:定量考核;2:定性考核
@ -146,7 +146,7 @@ type addDutyContent struct {
Content string ` json:"content" ` //描述
}
//编辑具体项目
// 编辑具体项目
type eiteDutyCont struct {
commonus . SetId
dutyClassAdd
@ -160,13 +160,13 @@ type eiteDutyCont struct {
Content string ` json:"content" ` //描述
}
//部门具体职责
// 部门具体职责
type specificDutyRequest struct {
commonus . PageSetLimt
DepartmentId string ` json:"departmentId" ` //部门ID
}
//部门具体职责输出
// 部门具体职责输出
type specificDutyOut struct {
assessmentmodel . DepartDuty
OutIdStruct
@ -185,7 +185,7 @@ type specificDutyOut struct {
GroupTitle string ` json:"groupTitle" ` //集团
}
//添加部门具体职责
// 添加部门具体职责
type addSpecificDutyCont struct {
ParentId string ` json:"parentId" ` //部门ID
ClassId string ` json:"classId" ` //考核类别
@ -201,7 +201,7 @@ type addDepartDutyCont struct {
Score int64 ` json:"score" ` //分数
}
//编辑部门具体职责
// 编辑部门具体职责
type eiteSpecificDutyCont struct {
commonus . SetId
ParentId string ` json:"parentId" ` //部门ID
@ -219,7 +219,7 @@ type eiteDepartDutyCont struct {
Score int64 ` json:"score" ` //分数
}
//输出考核关系架构
// 输出考核关系架构
type outAessDuty struct {
ClassId int64 ` json:"classId" `
ClassTitle string ` json:"classTitle" `
@ -228,7 +228,7 @@ type outAessDuty struct {
DutyTitle string ` json:"dutyTitle" `
}
//具体职责项与考核项目,类别
// 具体职责项与考核项目,类别
type dutyAssClass struct {
Title string ` json:"title" gorm:"column:dc_title;type:text;comment:具体职责" `
PartId int64 ` json:"partId" gorm:"column:dc_parent;type:bigint(20) unsigned;default:0;not null;comment:父级" `
@ -242,7 +242,7 @@ type dutyAssClass struct {
* /
type EvaluationScheme struct { }
//添加考核方案
// 添加考核方案
type AddScheme struct {
dutyClassAdd //标题
Group int64 ` json:"group" ` //集团
@ -282,7 +282,7 @@ type listTarget struct {
Dimension string ` json:"dimension" ` //维度 (待定是否使用)
}
//添加指标
// 添加指标
type addTargetType struct {
Title string ` json:"title" `
Type int ` json:"type" ` //1:定性考核;2:定量考核
@ -298,7 +298,7 @@ type addTargetType struct {
ScoringMethod int ` json:"scoringmethod" ` //计分方式(1:自动;2:手动)
}
//列表输出
// 列表输出
type outTargetList struct {
assessmentmodel . EvaluationTarget
OutId string ` json:"outid" `
@ -309,13 +309,13 @@ type outTargetList struct {
VisibleRangeDepartMap [ ] outTargetAttr ` json:"visiblerangedepartmap" ` //可见范围(分厂)
}
//输出结构体
// 输出结构体
type outTargetAttr struct {
Key string ` json:"key" `
Title string ` json:"title" `
}
//详细内容输出
// 详细内容输出
type outTargetInfo struct {
assessmentmodel . EvaluationTarget
GroupMap [ ] string ` json:"group" `
@ -326,7 +326,7 @@ type outTargetInfo struct {
VisibleRangeDepartMap [ ] string ` json:"visiblerangedepartmap" ` //可见范围(分厂)
}
//指标内容修改
// 指标内容修改
type eiteTargetTypeCont struct {
commonus . SetId
addTargetType
@ -340,14 +340,14 @@ type addAttTarget struct {
ParentId string ` json:"parentid" `
}
//子栏目列表
// 子栏目列表
type attTargetList struct {
commonus . PageSetLimt
addAttTarget
State int ` json:"state" ` //状态(1:启用;2:禁用;3:删除)
}
//子栏目列表输出
// 子栏目列表输出
type attTargetListOut struct {
assessmentmodel . QualitativeTarget
ParentIdStr string ` json:"parentidstr" `
@ -355,7 +355,7 @@ type attTargetListOut struct {
OutId string ` json:"outid" `
}
//指标子栏目修改
// 指标子栏目修改
type eiteAttTarget struct {
commonus . SetId
addAttTarget
@ -371,7 +371,7 @@ type addDetailedTargetType struct {
ParentIdSun string ` json:"parentidsun" `
}
//考核细则输出
// 考核细则输出
type outDetailedTargetType struct {
assessmentmodel . DetailedTarget
ParentIdStr string ` json:"parentidstr" `
@ -381,14 +381,14 @@ type outDetailedTargetType struct {
OutId string ` json:"outid" `
}
//考核细则列表
// 考核细则列表
type detailedTargetTypeList struct {
commonus . PageSetLimt
addDetailedTargetType
State int ` json:"state" ` //状态(1:启用;2:禁用;3:删除)
}
//修改考核细则
// 修改考核细则
type eitedetailedTargetCon struct {
commonus . SetId
addDetailedTargetType
@ -408,7 +408,7 @@ type AddQualEval struct {
EvaluationList [ ] QualEvalSunList ` json:"evaluationlist" ` //测评详情
}
//定性考核内容
// 定性考核内容
type QualEvalSunList struct {
DetailedTarget string ` json:"id" ` //考核细则
Title string ` json:"title" ` //指标说明
@ -421,13 +421,13 @@ type QualEvalSunList struct {
Operator [ ] string ` json:"userlist" ` //考核执行人
}
//查询定性考核列表
// 查询定性考核列表
type SelectQualEval struct {
Group string ` json:"group" ` //归属集团
DepartmentId string ` json:"parentid" ` //接受考核部门
}
//定性考核列表输出
// 定性考核列表输出
type QualEvalArrt struct {
Id string ` json:"id" `
Name string ` json:"name" `
@ -437,31 +437,31 @@ type QualEvalListOut struct {
Child [ ] QualEvalListOutDepart ` json:"child" ` //定性考核部门
}
//定性考核部门
// 定性考核部门
type QualEvalListOutDepart struct {
QualEvalArrt
Child [ ] DimensionList ` json:"child" ` //维度列表
}
//定性考核列表维度项目
// 定性考核列表维度项目
type DimensionList struct {
QualEvalArrt
Child [ ] TargetList ` json:"child" ` //定性指标
}
//定性指标
// 定性指标
type TargetList struct {
QualEvalArrt
Child [ ] TargetSunList ` json:"child" ` //定性指标子栏目
}
//定性指标子栏目
// 定性指标子栏目
type TargetSunList struct {
QualEvalArrt
Child [ ] taskDetails ` json:"child" ` //考核细则
}
//具体职责
// 具体职责
type taskDetails struct {
QualEvalArrt
Content string ` json:"content" ` //指标说明
@ -473,7 +473,7 @@ type taskDetails struct {
QeId string ` json:"qeid" `
}
//具体职责输出
// 具体职责输出
type taskDatalsContOut struct {
Id int64 ` json:"id" gorm:"column:qe_id;type:bigint(20) unsigned;not null;comment:Id;index" `
DetailedTarget int64 ` json:"detailedtarget" gorm:"column:qe_detailed_target;type:bigint(20) unsigned;default:0;not null;comment:考核细则" `
@ -484,38 +484,38 @@ type taskDatalsContOut struct {
State int ` json:"state" gorm:"column:qe_state;type:int(1) unsigned;default:1;not null;comment:状态(1:启用;2:禁用;3:删除)" `
}
//定量指标
// 定量指标
type QualEvalRationListOut struct {
QualEvalArrt
Child [ ] QualEvalRationListOutDepart ` json:"child" ` //定量考核部门
}
//定量考核部门
// 定量考核部门
type QualEvalRationListOutDepart struct {
QualEvalArrt
Child [ ] DimensionRationList ` json:"child" ` //维度列表
}
//定量考核列表维度项目
// 定量考核列表维度项目
type DimensionRationList struct {
QualEvalArrt
Child [ ] taskDetails ` json:"child" ` //定量指标
}
//定量指标
// 定量指标
type TargetRationList struct {
QualEvalArrt
Child [ ] taskDetails ` json:"child" ` //定量指标子栏目
}
//获取相关任务目标
// 获取相关任务目标
type taskTargetList struct {
Type int ` json:"type" ` //1:定性考核;2:定量考核
Group string ` json:"group" ` //归属集团
DepartMent [ ] string ` json:"department" `
}
//根据条件获取考核细则
// 根据条件获取考核细则
type SelectTaskTarget struct {
Type int ` json:"type" ` //1:定性考核;2:定量考核
TargetId string ` json:"targetid" `
@ -533,7 +533,7 @@ type AddRationCont struct {
RationList [ ] rationList ` json:"rationlist" ` //考核明细列表
}
//定量考核明细
// 定量考核明细
type rationList struct {
Target string ` json:"id" ` //考核指标
DepartmentId string ` json:"parentid" ` //执行考核部门ID
@ -544,13 +544,13 @@ type rationList struct {
Operator [ ] string ` json:"userlist" ` //考核执行人
}
//定量考核列表查询
// 定量考核列表查询
type rationSelect struct {
Group string ` json:"group" ` //归属集团
DepartmentId string ` json:"parentid" ` //接受考核部门
}
//部门考核
// 部门考核
type deparMentModelOld struct {
Id int64 ` json:"id" gorm:"column:bf_id;type:bigint(20);;primaryKey;unique;not null;autoIncrement;index" `
Name string ` json:"name" gorm:"column:bf_name;type:varchar(30);not null;comment:分厂名称" ` //'分厂名称',
@ -562,13 +562,13 @@ type deparMentModel struct {
WechatId int ` json:"wechatid" gorm:"column:wechat_organization_id;type:int(4) unsigned;default:0;not null;comment:对照微信id" ` //'对照微信id',
}
//部门考核输出列表
// 部门考核输出列表
type departmentDuty struct {
QualEvalArrt
Child [ ] departmentDimension ` json:"child" ` //考核细则
}
//部门考核维度输出列表
// 部门考核维度输出列表
type departmentDimension struct {
QualEvalArrt
Content string ` json:"content" ` //说明
@ -577,7 +577,7 @@ type departmentDimension struct {
Child [ ] taskDetails ` json:"child" ` //考核细则
}
//考核细则联动列表
// 考核细则联动列表
type taskDetailsLinkage struct {
QualEvalArrt
Content string ` json:"content" ` //指标说明
@ -591,7 +591,7 @@ type taskDetailsLinkage struct {
IsTrue int ` json:"istrue" ` //是否允许修改
}
//添加定性考核权重
// 添加定性考核权重
type addDepartmentDimensionWeight struct {
Hierarchy int64 ` json:"hierarchy" ` //层级
Type int64 ` json:"type" ` //1:定性考核;2:定量考核
@ -602,7 +602,7 @@ type addDepartmentDimensionWeight struct {
Weight int64 ` json:"weight" ` //权重
}
//批量添加指标权重
// 批量添加指标权重
type addDepartDimensionWeightAry struct {
// Hierarchy int64 `json:"hierarchy"` //层级
Type int64 ` json:"type" ` //1:定性考核;2:定量考核
@ -616,7 +616,7 @@ type targetListType struct {
Weight int64 ` json:"weight" ` //权重
}
//批量添加维度权重
// 批量添加维度权重
type addDepartDimenWeightAry struct {
// Hierarchy int64 `json:"hierarchy"` //层级
Type int64 ` json:"type" ` //1:定性考核;2:定量考核
@ -625,12 +625,12 @@ type addDepartDimenWeightAry struct {
Dimension [ ] targetListType ` json:"dimension" ` //维度
}
//获取定量考核相关列表
// 获取定量考核相关列表
type getDaulEvalDuty struct {
assessmentmodel . EvaluationTarget
}
//获取部门考核指标详情
// 获取部门考核指标详情
type QualitativeEite struct {
Dimension string ` json:"dimension" ` //考核维度
Target string ` json:"target" ` //考核指标
@ -639,7 +639,7 @@ type QualitativeEite struct {
DepartmentId string ` json:"departmentid" ` //接受考核部门
}
//输出部门考核指标详情
// 输出部门考核指标详情
type QualitativeEiteOut struct {
Group string ` json:"group" ` //归属集团
DepartmentId string ` json:"departmentid" ` //接受考核部门
@ -659,13 +659,13 @@ type DelQualitative struct {
VersionNumber string ` json:"versionnumber" ` //版本号码
}
//根据条件获取组合指标新的输出模式
// 根据条件获取组合指标新的输出模式
type GetTaskTargetNewList struct {
assessmentmodel . EvaluationTarget
ReportList [ ] string ` json:"reportlist" ` //上报人
}
//考核方案细则列表输出
// 考核方案细则列表输出
type TargetContOutCont struct {
Id string ` json:"id" `
Type int ` json:"type" `
@ -694,7 +694,7 @@ type TargetContOutCont struct {
MinOrMaxScore string ` json:"score" ` //参考分值
}
//修改考核方案单条细则
// 修改考核方案单条细则
type EiteOneQualEval struct {
commonus . SetIds
Content string ` json:"content" ` //指标说明
@ -706,13 +706,13 @@ type EiteOneQualEval struct {
Operator [ ] string ` json:"operator" ` //执行人列表
}
//考核卡片添加
// 考核卡片添加
type addAssEssCard struct {
AddQualEval
TargetSunTitle string ` json:"targetsuntitle" `
}
//定性考核指标对应的结构树参数
// 定性考核指标对应的结构树参数
type QualEvalTargetTreeDies struct {
Group string ` json:"group" ` //集团
DepartmentId string ` json:"parentid" ` //部门
@ -720,7 +720,7 @@ type QualEvalTargetTreeDies struct {
Target string ` json:"target" ` //指标
}
//添加部门考核项目新
// 添加部门考核项目新
type AddDutyNewContGroup struct {
Group string ` json:"group" ` //集团
DepartmentId string ` json:"parentid" ` //部门
@ -734,7 +734,7 @@ type AddDutyNewCont struct {
Child [ ] EvaluPross ` json:"child" ` //考核细则
}
//指标
// 指标
type EvaluPross struct {
Id string ` json:"id" ` //维度ID
Name string ` json:"name" `
@ -749,13 +749,13 @@ type EvaluPross struct {
Status int ` json:"status" `
}
//部门考核输出列表
// 部门考核输出列表
type departmentDutyNew struct {
QualEvalArrt
Child [ ] taskDetailsLinkage ` json:"child" ` //考核细则
}
//设定指标结算周期
// 设定指标结算周期
type SetEvaluationObjectives struct {
Year int64 ` json:"year" ` //年度
Group int64 ` json:"group" ` //集团
@ -767,7 +767,7 @@ type SetEvaluationObjectives struct {
CycleAdded [ ] CycleAddedType ` json:"cycleadded" `
}
//周期列表
// 周期列表
type CycleAddedType struct {
Id int64 ` json:"id" `
Zeroprize float64 ` json:"zeroprize" ` //零奖值"`
@ -775,7 +775,7 @@ type CycleAddedType struct {
Capping float64 ` json:"capping" ` //封顶值"`
}
//添加 定性考核指标关系指定细则
// 添加 定性考核指标关系指定细则
type DutyAssEssTarget struct {
Id int64 ` json:"id" `
Operator [ ] string ` json:"operator" ` //考核执行人