Browse Source

编写删除指定人员提交数据

master
超级管理员 3 years ago
parent
commit
96f43582a9
  1. 198
      api/v1/shiyan/shiyan.go
  2. 3
      router/shiyan/sys_shiyan.go

198
api/v1/shiyan/shiyan.go

@ -52,7 +52,7 @@ func Fanxing[T faxingType](key T, keyAry []T) bool {
return true
}
//校正定量审核流水全奖值零奖值封顶值设置
// 校正定量审核流水全奖值零奖值封顶值设置
func (s *ShiyanApi) XiaoZhengDingliang(c *gin.Context) {
var flowLogList []assessmentmodel.FlowLog
err := global.GVA_DB_Performanceappraisal.Find(&flowLogList).Error
@ -101,7 +101,7 @@ func (s *ShiyanApi) XiaoZhengDingliang(c *gin.Context) {
response.Result(0, err, "完成", c)
}
//get请求获参
// get请求获参
func (a *ShiyanApi) GetRequestOperation(c *gin.Context) {
id := c.Query("id")
fmt.Printf("====>%v\n", id)
@ -124,7 +124,7 @@ func GetNextMonth(dataSet int) {
fmt.Printf("%v------------------->%v------------------->%v------------------->%v------------------->%v\n", dataSet, lastMonthStart, lastMonthEnd, monthData, monthDatas)
}
//get请求获参
// get请求获参
type postGroupCanshu struct {
Id int `json:"id" from:"id"`
}
@ -142,7 +142,7 @@ func Round(val float64, precision int) float64 {
return math.Floor(val*p+0.5) / p
}
//实验递归
// 实验递归
func (s *ShiyanApi) DiGui(c *gin.Context) {
// var group []wechat.GroupForm
// listErr := global.GVA_DB_WatchDate.Find(&group).Error
@ -188,7 +188,7 @@ type Ddigui struct {
Date []int64
}
//递归递归函数
// 递归递归函数
func (d *Ddigui) faherDigui(id int64, groupStruct []wechat.GroupForm, parentId []int64) []int64 {
var parentIds []int64
// parentId = append(parentId, id)
@ -213,7 +213,7 @@ func (d *Ddigui) faherDigui(id int64, groupStruct []wechat.GroupForm, parentId [
return parentIds
}
//实验结果保存到数组
// 实验结果保存到数组
func (s *ShiyanApi) GormToMap(c *gin.Context) {
// returnData := commonus.MapOut()
// var returnData []map[string]interface{}
@ -232,7 +232,7 @@ type PersonInfo struct {
DefinitIons interface{} `json:"definitions"`
}
//读取json文件解析
// 读取json文件解析
func (s *ShiyanApi) ReadJsonFiles(c *gin.Context) {
filePtr, err := os.Open("conf/forkflow.json")
@ -280,7 +280,7 @@ type Definitions struct {
BPMNDiagram BPMNDiagramStruct `xml:"BPMNDiagram" json:"BPMNDiagram"` //BPMN图结构
}
//工作流过程
// 工作流过程
type ProcessStruct struct {
TextAndIdStruct
NameStruct
@ -291,17 +291,17 @@ type ProcessStruct struct {
SequenceFlow []SequenceFlowStruct `xml:"sequenceFlow" json:"sequenceFlow"` //序列流
}
//text结构体
// text结构体
type TextStruct struct {
Text string `xml:",chardata" json:",text"`
}
//name结构体
// name结构体
type NameStruct struct {
Name string `xml:"name,attr" json:"name"`
}
//Text与ID 结构
// Text与ID 结构
type TextAndIdStruct struct {
TextStruct
ID string `xml:"id,attr" json:"id"`
@ -311,19 +311,19 @@ type Documentationstruct struct {
TextStruct
}
//工作流开始事件
// 工作流开始事件
type StartEventStruct struct {
TextAndIdStruct
NameStruct
Outgoing []OutgoingStruct `xml:"outgoing" json:"outgoing"` //流程出口
}
//流程出口结构
// 流程出口结构
type OutgoingStruct struct {
TextStruct
}
//流程主体(用户任务)
// 流程主体(用户任务)
type UserTaskStruct struct {
TextAndIdStruct
NameStruct
@ -334,19 +334,19 @@ type UserTaskStruct struct {
Outgoing []OutgoingStruct `xml:"outgoing" json:"outgoing"` //流程去向(下一个节点)
}
//本节点来源
// 本节点来源
type IncomingStruct struct {
TextStruct
}
//结束事件
// 结束事件
type EndEventStruct struct {
TextAndIdStruct
NameStruct
Incoming []IncomingStruct `xml:"incoming" json:"incoming"` //来源
}
//序列流
// 序列流
type SequenceFlowStruct struct {
TextAndIdStruct
NameStruct
@ -355,19 +355,19 @@ type SequenceFlowStruct struct {
ConditionExpression ConditionExpressionStruct `xml:"conditionExpression" json:"conditionExpression"` //条件表达式
}
//条件表达式
// 条件表达式
type ConditionExpressionStruct struct {
TextStruct
Type string `xml:"type,attr" json:"type"`
}
//BPMN图结构
// BPMN图结构
type BPMNDiagramStruct struct {
TextAndIdStruct
BPMNPlane BPMNPlaneStruct `xml:"BPMNPlane" json:"BPMNPlane"`
}
//图平面坐标参数
// 图平面坐标参数
type BPMNPlaneStruct struct {
TextAndIdStruct
BpmnElement string `xml:"bpmnElement,attr" json:"bpmnElement"` //Bpmn元素
@ -375,7 +375,7 @@ type BPMNPlaneStruct struct {
BPMNEdge []BPMNEdgeStruct `xml:"BPMNEdge" json:"BPMNEdge"` //Bpmn界限
}
//Bpmn 坐标参数
// Bpmn 坐标参数
type BPMNShapeStruct struct {
TextAndIdStruct
BpmnElement string `xml:"bpmnElement,attr" json:"bpmnElement"`
@ -383,7 +383,7 @@ type BPMNShapeStruct struct {
BPMNLabel BPMNLabelStruct `xml:"BPMNLabel" json:"BPMNLabel"` //BPMN标签
}
//图形元素坐标
// 图形元素坐标
type BoundsStruct struct {
TextStruct
X string `xml:"x,attr" json:"x"`
@ -392,27 +392,27 @@ type BoundsStruct struct {
Height string `xml:"height,attr" json:"height"`
}
//BPMN标签
// BPMN标签
type BPMNLabelStruct struct {
TextStruct
Bounds BoundsStruct `xml:"Bounds" json:"Bounds"` //图形元素坐标
}
//Bpmn界限
// Bpmn界限
type BPMNEdgeStruct struct {
TextAndIdStruct
BpmnElement string `xml:"bpmnElement,attr" json:"bpmnElement"`
Waypoint []WaypointStruct `xml:"waypoint" json:"waypoint"` //线路径坐标
}
//线路径坐标
// 线路径坐标
type WaypointStruct struct {
TextStruct
X string `xml:"x,attr" json:"x"`
Y string `xml:"y,attr" json:"y"`
}
//接收参数
// 接收参数
type XmlCanShu struct {
ProcessKey string `json:"processKey"`
ProcessName string `json:"processName"`
@ -422,7 +422,7 @@ type XmlCanShu struct {
JsonStr string `json:"jsonstr"`
}
//工作流XML解析
// 工作流XML解析
func (s *ShiyanApi) XmlToJson(c *gin.Context) {
var xmlToStruct Definitions
var reportAnswer XmlCanShu
@ -521,7 +521,7 @@ type ExamineApprove struct {
State int `json:"state"` //状态
}
//审批记录Redis过度
// 审批记录Redis过度
type ApprovalProcessLogRedis struct {
Id string `json:"id"`
Process string `json:"process" `
@ -534,7 +534,7 @@ type ApprovalProcessLogRedis struct {
State string `json:"state"`
}
//创建及审批
// 创建及审批
func (s *ShiyanApi) EstablishApprove(c *gin.Context) {
var examineApprove ExamineApprove
err := c.ShouldBindJSON(&examineApprove)
@ -697,7 +697,7 @@ func (s *ShiyanApi) EstablishApprove(c *gin.Context) {
}
}
//批准操作
// 批准操作
func ApproveOperation(runApprovalProcess approvalprocess.ApprovalProcessLog, examineApprove ExamineApprove) (isTrue bool) {
// fmt.Printf("审批ID==Redis==》%v-------------%v\n", runApprovalProcess.Id, runApprovalProcess)
isTrue = false
@ -917,7 +917,7 @@ func ApprovalCriteria(execStatus int, process ProcessStruct, examineApprove Exam
return
}
//实验发送按钮交互模板
// 实验发送按钮交互模板
func (s *ShiyanApi) SendButtonMsg(c *gin.Context) {
// var sendMsg commonus.ButtonTemplateAll
var sendMsg commonus.ButtonTemplate
@ -1119,8 +1119,8 @@ func (s *ShiyanApi) SendButtonMessageAll(c *gin.Context) {
}
//模板卡片消息
//文本通知型
// 模板卡片消息
// 文本通知型
func (s *ShiyanApi) SendTextMessageAll(c *gin.Context) {
// var sendTextMsg commonus.TextNotice
@ -1207,7 +1207,7 @@ func (s *ShiyanApi) SendTextMessageAll(c *gin.Context) {
response.Result(0, outData, "查询成功", c)
}
//图文展示型
// 图文展示型
func (s *ShiyanApi) SendImageMessageAll(c *gin.Context) {
// var sendTextMsg commonus.ImageTextTemplate
@ -1311,7 +1311,7 @@ func (s *ShiyanApi) SendImageMessageAll(c *gin.Context) {
response.Result(0, outData, "查询成功", c)
}
//获取审批模板详情
// 获取审批模板详情
func (s *ShiyanApi) GetEatilTemplate(c *gin.Context) {
var requestData sendmessage.TemplatedEtailType
err := c.ShouldBindJSON(&requestData)
@ -1350,7 +1350,7 @@ type timeDataType struct {
Type int `json:"type"`
}
//时间日期实现
// 时间日期实现
func (s *ShiyanApi) DateTime(c *gin.Context) {
// var requestData timeDataType
// err := c.ShouldBindJSON(&requestData)
@ -1368,7 +1368,7 @@ func (s *ShiyanApi) DateTime(c *gin.Context) {
response.Result(0, 0, "查询成功", c)
}
//校正权重
// 校正权重
func (s *ShiyanApi) CorrectionWeight(c *gin.Context) {
var ddwList assessmentmodel.DepartmentDimensionWeight
err := global.GVA_DB_Performanceappraisal.Find(&ddwList)
@ -1378,7 +1378,7 @@ func (s *ShiyanApi) CorrectionWeight(c *gin.Context) {
}
}
//考核方案去重
// 考核方案去重
func (s *ShiyanApi) DeltDutyChongfu(c *gin.Context) {
var list []assessmentmodel.QualitativeEvaluation
err := global.GVA_DB_Performanceappraisal.Find(&list).Error
@ -1392,7 +1392,7 @@ func (s *ShiyanApi) DeltDutyChongfu(c *gin.Context) {
}
}
//执行去重删除操作
// 执行去重删除操作
func DelteGroup(group, depart, dime, target, suntar, detaid int64, runDepart string) {
var countId []int64
err := global.GVA_DB_Performanceappraisal.Model(&assessmentmodel.QualitativeEvaluation{}).Select("qe_id").Where("`qe_group` = ? AND `qe_accept_evaluation` = ? AND `qe_dimension` = ? AND `qe_target` = ? AND `qe_target_sun` = ? AND `qe_detailed_target` = ? AND `qe_department_id` = ?", group, depart, dime, target, suntar, detaid, runDepart).Find(&countId).Error
@ -1410,7 +1410,7 @@ func DelteGroup(group, depart, dime, target, suntar, detaid int64, runDepart str
}
}
//文本实验 textcomparison
// 文本实验 textcomparison
func (s *ShiyanApi) TextShiyan(c *gin.Context) {
participle := textcomparison.NewGoJieba()
//去除文本Html标签
@ -1457,7 +1457,7 @@ type jimishiyan struct {
Password string `json:"password"`
}
//加密实验
// 加密实验
func (s *ShiyanApi) JiaMi(c *gin.Context) {
var user jimishiyan
@ -1481,7 +1481,7 @@ func (s *ShiyanApi) JiaMi(c *gin.Context) {
response.Result(101, outMap, "sha1Token加密实验!", c)
}
//处理子栏目归属
// 处理子栏目归属
func (s *ShiyanApi) SunTar(c *gin.Context) {
var sunList []assessmentmodel.QualitativeTarget
err := global.GVA_DB_Performanceappraisal.Find(&sunList).Error
@ -1499,7 +1499,7 @@ func (s *ShiyanApi) SunTar(c *gin.Context) {
}
}
//获取指标归属分厂
// 获取指标归属分厂
func GetGuishuDepart(targetId int64) (departStr string) {
var targetCont assessmentmodel.EvaluationTarget
err := global.GVA_DB_Performanceappraisal.Where("et_id = ?", targetId).First(&targetCont).Error
@ -1509,7 +1509,7 @@ func GetGuishuDepart(targetId int64) (departStr string) {
return
}
//数据迁移
// 数据迁移
func (s *ShiyanApi) DataQianyi(c *gin.Context) {
var assTarCont []assessmentmodel.Assesstarget
assErr := global.GVA_DB_Performanceappraisal.Find(&assTarCont).Error
@ -1596,8 +1596,7 @@ func (s *ShiyanApi) DataQianyi(c *gin.Context) {
// synPro.Wait()
}
//
//分数流水
// 分数流水
func qianyiscoreFlowContTar(id, groupId, departStr, evaGroup, evalDep int64) {
saveData := commonus.MapOut()
saveData["sf_eite_time"] = time.Now().Unix()
@ -1611,7 +1610,7 @@ func qianyiscoreFlowContTar(id, groupId, departStr, evaGroup, evalDep int64) {
global.GVA_DB_Performanceappraisal.Model(&assessmentmodel.ScoreFlow{}).Where("sf_id = ?", id).Updates(saveData)
}
//整改措施
// 整改措施
func qianyirecMeaTar(id, groupId, departStr int64) {
// defer synPro.Done()
saveData := commonus.MapOut()
@ -1622,7 +1621,7 @@ func qianyirecMeaTar(id, groupId, departStr int64) {
global.GVA_DB_Performanceappraisal.Model(&assessmentmodel.RectificationMeasures{}).Where("rm_id = ?", id).Updates(saveData)
}
//定性指标子栏目
// 定性指标子栏目
func qianyiqualTarTar(id int64, departStr string) {
saveData := commonus.MapOut()
saveData["q_time"] = time.Now().Unix()
@ -1631,7 +1630,7 @@ func qianyiqualTarTar(id int64, departStr string) {
global.GVA_DB_Performanceappraisal.Model(&assessmentmodel.QualitativeTarget{}).Where("q_id = ?", id).Updates(saveData)
}
//定性考核
// 定性考核
func qianyiqualEvalTar(id, groupId, departInt int64, departStr string) {
saveData := commonus.MapOut()
saveData["qe_eitetime"] = time.Now().Unix()
@ -1642,7 +1641,7 @@ func qianyiqualEvalTar(id, groupId, departInt int64, departStr string) {
global.GVA_DB_Performanceappraisal.Model(&assessmentmodel.QualitativeEvaluation{}).Where("qe_id = ?", id).Updates(saveData)
}
//考核方案版本内容
// 考核方案版本内容
func qianyiplanVersioTar(id, groupId, departStr int64) {
// defer synPro.Done()
saveData := commonus.MapOut()
@ -1654,7 +1653,7 @@ func qianyiplanVersioTar(id, groupId, departStr int64) {
global.GVA_DB_Performanceappraisal.Model(&assessmentmodel.PlanVersio{}).Where("id = ?", id).Updates(saveData)
}
//测评指标
// 测评指标
func qianyievalTarTar(id int64, departStr string) {
saveData := commonus.MapOut()
saveData["et_time"] = time.Now().Unix()
@ -1663,7 +1662,7 @@ func qianyievalTarTar(id int64, departStr string) {
global.GVA_DB_Performanceappraisal.Model(&assessmentmodel.EvaluationTarget{}).Where("et_id = ?", id).Updates(saveData)
}
//划分责任
// 划分责任
func qianyidivresTar(id, groupId, departStr, evaGroup, evalDep int64) {
saveData := commonus.MapOut()
saveData["df_eite_time"] = time.Now().Unix()
@ -1677,7 +1676,7 @@ func qianyidivresTar(id, groupId, departStr, evaGroup, evalDep int64) {
global.GVA_DB_Performanceappraisal.Model(&assessmentmodel.DivisionResponsibilities{}).Where("df_id = ?", id).Updates(saveData)
}
//迁移部门考核指标权重
// 迁移部门考核指标权重
func qianyiDdwTar(id, groupId, departStr int64) {
// defer synPro.Done()
saveData := commonus.MapOut()
@ -1689,7 +1688,7 @@ func qianyiDdwTar(id, groupId, departStr int64) {
global.GVA_DB_Performanceappraisal.Model(&assessmentmodel.DepartmentDimensionWeight{}).Where("ddw_id = ?", id).Updates(saveData)
}
//迁移考核指标
// 迁移考核指标
func qianyiAssTar(id, groupId int64, departStr string) {
// defer synPro.Done()
// fmt.Printf("AssTar--------->%v---->%v---->%v\n", id, groupId, departStr)
@ -1704,7 +1703,7 @@ func qianyiAssTar(id, groupId int64, departStr string) {
// fmt.Printf("AssAry-----%v------>%v\n", id, saveData)
}
//获取集团对照码
// 获取集团对照码
func getGroupToOrg(group int64) (groupId int64) {
groupId = 0
groupAry := map[int64]int64{3: 2}
@ -1720,7 +1719,7 @@ func getGroupToOrg(group int64) (groupId int64) {
return
}
//获取部门对照码
// 获取部门对照码
func getDepartToOrgInt(depart int64) (departStr string) {
departAry := map[int64]string{
11: "3",
@ -1790,7 +1789,7 @@ func getDepartToOrg(depart string) (departStr string) {
return
}
//获取人员组织架构信息
// 获取人员组织架构信息
func getUserOrgSchool(group, depart int64) (gro int64, department string) {
groupAry := map[int64]int64{3: 2}
for gi, gv := range groupAry {
@ -1861,7 +1860,7 @@ func getUserOrgSchool(group, depart int64) (gro int64, department string) {
return
}
//获取组织架构对照
// 获取组织架构对照
func getOrgSchool(id int64) (deparmentId, orgId int64) {
var orgInfo outOrgCont
err := global.GVA_DB_HrDataBase.Model(&hrsystem.AdministrativeOrganization{}).Select("id,organization_type,superior").Where("schoole = ?", id).First(&orgInfo).Error
@ -1883,7 +1882,7 @@ func getOrgSchool(id int64) (deparmentId, orgId int64) {
return
}
//获取hr系统中的职务
// 获取hr系统中的职务
func getHrPosition(posId int64) int64 {
var id int64
err := global.GVA_DB_HrDataBase.Model(&hrsystem.Position{}).Select("id").Where("`school` = ?", posId).First(&id).Error
@ -1893,7 +1892,7 @@ func getHrPosition(posId int64) int64 {
return 0
}
//获取职务相关属性
// 获取职务相关属性
func getJobInfo(jobId int64) (cont jobAttber, err error) {
var positionInfo hrsystem.Position
// err = global.GVA_DB_HrDataBase.Table(fmt.Sprintf("%s p", positionInfo.TableName())).Select("p.id,p.number,p.name,p.person_in_charge,d.id as dutid,d.name as dutname,d.number as dutnumber,j.id as jobid,j.name as jobname").Joins("left join duties as d on d.id = p.duties").Joins("left join job_class as j on j.id = d.job_type").Where("`p`.`id` = ?", jobId).First(&cont).Error
@ -1901,7 +1900,7 @@ func getJobInfo(jobId int64) (cont jobAttber, err error) {
return
}
//删除指标数据
// 删除指标数据
func (s *ShiyanApi) DeleteTarget(c *gin.Context) {
var requestData delTargetStr
err := c.ShouldBindJSON(&requestData)
@ -1978,7 +1977,7 @@ func (s *ShiyanApi) DeleteTarget(c *gin.Context) {
response.Result(0, qualEvalId, "处理完成!", c)
}
//根据提交人删除定量数据
// 根据提交人删除定量数据
func (s *ShiyanApi) BasisMan(c *gin.Context) {
var requestData basisType
err := c.ShouldBindJSON(&requestData)
@ -2006,7 +2005,7 @@ func (s *ShiyanApi) BasisMan(c *gin.Context) {
response.Result(0, flowLogErr, "处理完成!", c)
}
//归档审批流程
// 归档审批流程
func (s *ShiyanApi) EvalProcesGuiDang(c *gin.Context) {
var epList []assessmentmodel.EvaluationProcess
err := global.GVA_DB_Performanceappraisal.Find(&epList).Error
@ -2070,7 +2069,7 @@ func (s *ShiyanApi) EvalProcesGuiDang(c *gin.Context) {
response.Result(0, err, "处理完成!", c)
}
//归档定性考核指标数据
// 归档定性考核指标数据
func (s *ShiyanApi) GuiDangDingLiangKaoHeData(c *gin.Context) {
var fldList []assessmentmodel.FlowLogData
err := global.GVA_DB_Performanceappraisal.Model(&assessmentmodel.FlowLogData{}).Select("fld_id,fld_evaluation_id").Find(&fldList).Error
@ -2091,7 +2090,7 @@ func (s *ShiyanApi) GuiDangDingLiangKaoHeData(c *gin.Context) {
response.Result(0, err, "处理完成!", c)
}
//定性考核归档指标ID
// 定性考核归档指标ID
func (s *ShiyanApi) GuiDangDingXingKaoHeData(c *gin.Context) {
var slDataList []assessmentmodel.ScoreFlow
err := global.GVA_DB_Performanceappraisal.Model(&assessmentmodel.ScoreFlow{}).Select("sf_id,sf_evaluation_plan").Find(&slDataList).Error
@ -2113,7 +2112,7 @@ func (s *ShiyanApi) GuiDangDingXingKaoHeData(c *gin.Context) {
response.Result(0, err, "处理完成!", c)
}
//获取数据异常得提交
// 获取数据异常得提交
func (s *ShiyanApi) Shujuyichang(c *gin.Context) {
var looknoepares []Looknoepares
idIns := []int{1, 2, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 58, 179, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198}
@ -2138,7 +2137,7 @@ func (s *ShiyanApi) Shujuyichang(c *gin.Context) {
}
}
//归档部门考核方案版本时间周期问题
// 归档部门考核方案版本时间周期问题
func (s *ShiyanApi) DepartmentPlanVersion(c *gin.Context) {
//获取考核方案
var assessTargetContentList []assessmentmodel.PlanVersio
@ -2204,7 +2203,7 @@ func (s *ShiyanApi) DepartmentPlanVersion(c *gin.Context) {
response.Result(0, planVersioErr, "完成!", c)
}
//行政组织树
// 行政组织树
func (s *ShiyanApi) GovThree(c *gin.Context) {
var requestData govThreeType
c.ShouldBindJSON(&requestData)
@ -2248,7 +2247,7 @@ func GovThreeList(parentId int64, govAry []OutGovCont) []govThree {
return govMap
}
//绩效考核系统对照行政组织关系
// 绩效考核系统对照行政组织关系
func (s *ShiyanApi) CorrectingOrg(c *gin.Context) {
//assessment_loging
// synPro.Add(1)
@ -2310,7 +2309,7 @@ func (s *ShiyanApi) CorrectingOrg(c *gin.Context) {
response.Result(0, nil, "完成!", c)
}
//考核指标
// 考核指标
func corAssAssesstarget() {
defer synPro.Done()
var assList []assessmentmodel.Assesstarget
@ -2335,7 +2334,7 @@ func corAssAssesstarget() {
}
}
//考核记录自建审批流
// 考核记录自建审批流
func corAssMentLog() {
defer synPro.Done()
var assessmentLoging []assessmentmodel.AssessmentLogIng
@ -2361,7 +2360,7 @@ func corAssMentLog() {
}
}
//行政组织转码
// 行政组织转码
func orgTransCoding(ordId int64) (newOrgId int64) {
if ordId == 0 {
return
@ -2386,7 +2385,7 @@ func orgTransCoding(ordId int64) (newOrgId int64) {
return
}
//行政组织转码
// 行政组织转码
func orgTransCodingName(ordId int64, field ...string) (newOrgCont hrsystem.AdministrativeOrganization) {
if ordId == 0 {
return
@ -2414,7 +2413,7 @@ func orgTransCodingName(ordId int64, field ...string) (newOrgCont hrsystem.Admin
return
}
//行政组织转码数组
// 行政组织转码数组
func orgTransCodingAry(ordId []string) (newOrgId []string) {
if len(ordId) <= 0 {
return
@ -2439,7 +2438,7 @@ func orgTransCodingAry(ordId []string) (newOrgId []string) {
return
}
//职位对照
// 职位对照
func positToKingdeePosit(ordId int64, field ...string) (newCont hrsystem.Position) {
if ordId == 0 {
return
@ -2491,7 +2490,7 @@ func positToKingdeePositScho(ordId int64, field ...string) (newCont hrsystem.Pos
return
}
//部门维度
// 部门维度
func corDeparDime() {
defer synPro.Done()
// var departDimeList []assessmentmodel.DepartmentDimension
@ -2508,7 +2507,7 @@ func corDeparDime() {
// }
}
//部门考核指标权重
// 部门考核指标权重
func corDepartDimWeight() {
defer synPro.Done()
var departDimWeigList []assessmentmodel.DepartmentDimensionWeight
@ -2533,7 +2532,7 @@ func corDepartDimWeight() {
}
}
//指标细则
// 指标细则
func corDetailedTarget() {
defer synPro.Done()
var departDimWeigList []assessmentmodel.DetailedTarget
@ -2557,7 +2556,7 @@ func corDetailedTarget() {
}
}
//划分责任
// 划分责任
func corDivResp() {
defer synPro.Done()
var departDimWeigList []assessmentmodel.DivisionResponsibilities
@ -2588,7 +2587,7 @@ func corDivResp() {
}
}
//审批流程
// 审批流程
func corEvalProcess() {
defer synPro.Done()
var departDimWeigList []assessmentmodel.EvaluationProcess
@ -2709,7 +2708,7 @@ func corEvalProcess() {
}
}
//获取原知行学院部门代码
// 获取原知行学院部门代码
func oldSchooldBf(ordId int64, field ...string) (newOrgCont hrsystem.AdministrativeOrganization) {
if ordId == 0 {
return
@ -2740,7 +2739,7 @@ func oldSchooldBf(ordId int64, field ...string) (newOrgCont hrsystem.Administrat
return
}
//测评指标 测评指标
// 测评指标 测评指标
func corEvaluaTionTarget() {
defer synPro.Done()
var departDimWeigList []assessmentmodel.EvaluationTarget
@ -2764,7 +2763,7 @@ func corEvaluaTionTarget() {
}
}
//定量考核数据表
// 定量考核数据表
func flowLogDivResp() {
defer synPro.Done()
var departDimWeigList []assessmentmodel.FlowLog
@ -2795,7 +2794,7 @@ func flowLogDivResp() {
}
}
//考核方案版本内容
// 考核方案版本内容
func corPlanversio() {
defer synPro.Done()
var departDimWeigList []assessmentmodel.PlanVersio
@ -2820,7 +2819,7 @@ func corPlanversio() {
}
}
//定性考核
// 定性考核
func corQualitativeEvaluation() {
defer synPro.Done()
var departDimWeigList []assessmentmodel.QualitativeEvaluation
@ -2849,7 +2848,7 @@ func corQualitativeEvaluation() {
}
}
//定性指标子栏目
// 定性指标子栏目
func corQualitativeTarget() {
defer synPro.Done()
var departDimWeigList []assessmentmodel.QualitativeTarget
@ -2873,7 +2872,7 @@ func corQualitativeTarget() {
}
}
//定量考核目标设定
// 定量考核目标设定
func corQualitativeConfig() {
defer synPro.Done()
var departDimWeigList []assessmentmodel.QuantitativeConfig
@ -2898,7 +2897,7 @@ func corQualitativeConfig() {
}
}
//整改措施
// 整改措施
func corRectificationMeasures() {
defer synPro.Done()
var departDimWeigList []assessmentmodel.RectificationMeasures
@ -2923,7 +2922,6 @@ func corRectificationMeasures() {
}
}
//
func corScoreFlow() {
defer synPro.Done()
var departDimWeigList []assessmentmodel.ScoreFlow
@ -2953,3 +2951,25 @@ func corScoreFlow() {
}
}
}
// 删除指定人的考核数据
func (s *ShiyanApi) DelFlowDataUser(c *gin.Context) {
var requestData FlowLogAllZreo
c.ShouldBindJSON(&requestData)
if requestData.Id == "" {
response.Result(1000, requestData, "请输入人员ID", c)
return
}
//定量删除
var flowKey []int64
flErr := global.GVA_DB_Performanceappraisal.Model(&assessmentmodel.FlowLog{}).Select("`fl_key`").Where("fl_evaluation_user = ?", requestData.Id).Find(&flowKey).Error
if flErr == nil {
if len(flowKey) > 0 {
global.GVA_DB_Performanceappraisal.Where("fld_flow_log IN ?", flowKey).Delete(&assessmentmodel.FlowLogData{})
global.GVA_DB_Performanceappraisal.Where("fl_key IN ?", flowKey).Delete(&assessmentmodel.FlowLog{})
}
}
//定性审核
global.GVA_DB_Performanceappraisal.Where("sf_evaluation_user = ?", requestData.Id).Delete(&assessmentmodel.ScoreFlow{})
response.Result(0, requestData, "处理完毕", c)
}

3
router/shiyan/sys_shiyan.go

@ -53,6 +53,7 @@ func (s *ShiyanRouter) InitShiyanRouter(Router *gin.RouterGroup) {
shiyanCodeRouter.POST("govthree", authorityApi.GovThree) //行政组织树
shiyanCodeRouter.POST("correctingorg", authorityApi.CorrectingOrg) //校正行政组织
shiyanCodeRouter.POST("correctingorg", authorityApi.CorrectingOrg) //校正行政组织
shiyanCodeRouter.POST("delflowdatauser", authorityApi.DelFlowDataUser) //删除人员提交数据
}
}

Loading…
Cancel
Save