Commit 4a19ef46 authored by 姬鋆屾's avatar 姬鋆屾
parents 611d2fe5 d3f9ec47
<template> <template>
<div> <div>
<el-dialog title="人员选择" :visible.sync="treeDialog">
<div class="treeDialog">
<el-tree class="treeCss" :data="treeData" node-key="id" :props="defaultProps"
@node-click="handleNodeClick"></el-tree>
<div class="treeCss" style="margin-left: 10px;">
<div style="margin-top: 3px;">
{{ cityOptions.length > 0 ? '请选择人员' : '请选择部门' }}
</div>
<!-- <el-checkbox v-show="cityOptions.length > 0" :indeterminate="isIndeterminate"
v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox> -->
<el-checkbox-group v-model="checkedCities">
<el-checkbox v-for="i in cityOptions" :label="i.staffId" :key="i">{{ i.staffName
}}</el-checkbox>
</el-checkbox-group>
</div>
</div>
<div style="text-align: center;margin-top: 10px;">
<el-button size="small" @click="checkedCities = []">重置</el-button>
<el-button size="small" type="primary" @click="subUser">确定</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
...@@ -10,6 +30,4 @@ export default { ...@@ -10,6 +30,4 @@ export default {
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped></style>
\ No newline at end of file
</style>
\ No newline at end of file
...@@ -85,18 +85,16 @@ ...@@ -85,18 +85,16 @@
@node-click="handleNodeClick"></el-tree> @node-click="handleNodeClick"></el-tree>
<div class="treeCss" style="margin-left: 10px;"> <div class="treeCss" style="margin-left: 10px;">
<div style="margin-top: 3px;"> <div style="margin-top: 3px;">
{{ cityOptions.length > 0 ? '请选择人员' : '请选择部门' }} {{ userOptions.length > 0 ? '请选择人员' : '请选择部门' }}
</div> </div>
<!-- <el-checkbox v-show="cityOptions.length > 0" :indeterminate="isIndeterminate" <el-checkbox-group v-model="checkedUser">
v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox> --> <el-checkbox v-for="i in userOptions" :label="i.staffId" :key="i">{{ i.staffName
<el-checkbox-group v-model="checkedCities">
<el-checkbox v-for="i in cityOptions" :label="i.staffId" :key="i">{{ i.staffName
}}</el-checkbox> }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
</div> </div>
<div style="text-align: center;margin-top: 10px;"> <div style="text-align: center;margin-top: 10px;">
<el-button size="small" @click="checkedCities = []">重置</el-button> <el-button size="small" @click="checkedUser = []">重置</el-button>
<el-button size="small" type="primary" @click="subUser">确定</el-button> <el-button size="small" type="primary" @click="subUser">确定</el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -175,28 +173,26 @@ export default { ...@@ -175,28 +173,26 @@ export default {
}, },
treeDialog: 0, treeDialog: 0,
checkAll: false, userOptions: [],
cityOptions: [], checkedUser: [],
checkedCities: [],
isIndeterminate: true
} }
}, },
mounted() { mounted() {
this.getDeptData() this.getDeptData()
}, },
methods: { methods: {
handleCheckAllChange(val) {
console.log(val)
this.checkedCities = val ? this.cityOptions : [];
this.isIndeterminate = false;
},
subUser() { subUser() {
console.log(this.checkedCities) console.log(this.checkedUser)
if (this.checkedUser.length > 0) {
this.treeDialog = 0
} else {
this.$message.warning('请选择人员')
}
}, },
handleNodeClick(data) { handleNodeClick(data) {
if (data.personList) { if (data.personList) {
this.cityOptions = data.personList this.userOptions = data.personList
// console.log(this.cityOptions) // console.log(this.userOptions)
} }
}, },
//获取部门数据 //获取部门数据
...@@ -253,6 +249,10 @@ export default { ...@@ -253,6 +249,10 @@ export default {
return JSON.stringify(FcDesignerOptions) return JSON.stringify(FcDesignerOptions)
}, },
issueFormBtn(formName) { issueFormBtn(formName) {
if (this.checkedUser.length < 1) {
this.$message.warning('请选择人员后发布问卷')
return
}
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
console.log(this.issueForm) console.log(this.issueForm)
...@@ -273,6 +273,7 @@ export default { ...@@ -273,6 +273,7 @@ export default {
}) })
let sub = { let sub = {
staffList: this.checkedUser,
id: '', id: '',
...this.titleForm, ...this.titleForm,
feedbackTimeStart: this.issueForm.time[0], feedbackTimeStart: this.issueForm.time[0],
......
...@@ -19,17 +19,18 @@ ...@@ -19,17 +19,18 @@
<div class="content"> <div class="content">
<div class="cLeft"> <div class="cLeft">
<div class="title"> <div>
全部数据(220) <span class="cLeftTop" style="margin: 0;" :class="selTitle == 1 ? 'title' : ''"
<span style="font-weight: 400; font-size: 16px;margin-left: 20px;">已反馈(1)</span> @click="selTitle = 1">全部数据(220)</span>
<span style="font-weight: 400; font-size: 16px;margin-left: 20px;">未反馈(219)</span> <span class="cLeftTop" :class="selTitle == 2 ? 'title' : ''" @click="selTitle = 2">已反馈(1)</span>
<span class="cLeftTop" :class="selTitle == 3 ? 'title' : ''"
@click="selTitle = 3">未反馈(219)</span>
</div> </div>
<el-button class="m15" type="primary" size="small">导出数据</el-button> <el-button class="m15" type="primary" size="small">导出数据</el-button>
<div class="lBox m15"> <div class="lBox m15">
<div class="treeS"> <div class="treeS">
<el-tree :data="treeData" :props="defaultProps" @node-click="treeSub"></el-tree> <el-tree :data="treeData" :props="defaultProps" @node-click="treeSub"></el-tree>
</div> </div>
<el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%" <el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%"
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"> <el-table-column type="selection" width="55">
...@@ -124,6 +125,7 @@ export default { ...@@ -124,6 +125,7 @@ export default {
Fopthion: '', Fopthion: '',
drawerAnswer: false, drawerAnswer: false,
feedbackData: {}, feedbackData: {},
selTitle: 1,
tableData: [{ tableData: [{
date: '2016-05-02', date: '2016-05-02',
name: '王小虎', name: '王小虎',
...@@ -179,7 +181,8 @@ export default { ...@@ -179,7 +181,8 @@ export default {
defaultProps: { defaultProps: {
children: 'children', children: 'children',
label: 'label' label: 'label'
} },
} }
}, },
mounted() { mounted() {
...@@ -419,6 +422,12 @@ export default { ...@@ -419,6 +422,12 @@ export default {
box-sizing: border-box; box-sizing: border-box;
padding: 20px; padding: 20px;
.cLeftTop {
font-size: 16px;
margin-left: 20px;
cursor: pointer;
}
.lBox { .lBox {
display: flex; display: flex;
// align-items: center // align-items: center
......
...@@ -13,17 +13,8 @@ ...@@ -13,17 +13,8 @@
<div class="content"> <div class="content">
<div class="search_box"> <div class="search_box">
<div class="search"> <div class="search">
<el-select <el-select v-model="dateValue" placeholder="请选择" style="margin: 0 10px;">
v-model="dateValue" <el-option v-for="item in optionsMonths" :key="item.value" :label="item.label" :value="item.value">
placeholder="请选择"
style="margin: 0 10px;"
>
<el-option
v-for="item in optionsMonths"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
<el-button type="primary">搜索</el-button> <el-button type="primary">搜索</el-button>
...@@ -32,29 +23,17 @@ ...@@ -32,29 +23,17 @@
<div class="data_box"> <div class="data_box">
<div class="top"> <div class="top">
<div class="box"> <div class="box">
<bar-charts <bar-charts :title="'申诉次数部门排名TOP20'" :id="'dept_20'" :legendName="'申诉次数'"
:title="'申诉次数部门排名TOP20'" :styleObj="{ width: '800px', height: '360px' }" />
:id="'dept_20'"
:legendName="'申诉次数'"
:styleObj="{ width: '800px', height: '360px' }"
/>
</div> </div>
<div class="box"> <div class="box">
<bar-charts <bar-charts :title="'申诉次数个人排名TOP20'" :id="'person_20'" :legendName="'申诉次数'"
:title="'申诉次数个人排名TOP20'" :styleObj="{ width: '800px', height: '360px' }" />
:id="'person_20'"
:legendName="'申诉次数'"
:styleObj="{ width: '800px', height: '360px' }"
/>
</div> </div>
</div> </div>
<div class="down"> <div class="down">
<bar-charts <bar-charts :title="'申诉次数规则排名TOP20'" :id="'rule_20'" :legendName="'申诉次数'"
:title="'申诉次数规则排名TOP20'" :styleObj="{ width: '1800px', height: '320px' }" />
:id="'rule_20'"
:legendName="'申诉次数'"
:styleObj="{ width: '1800px', height: '320px' }"
/>
</div> </div>
</div> </div>
</div> </div>
...@@ -248,57 +227,66 @@ export default { ...@@ -248,57 +227,66 @@ export default {
activeName: "1", activeName: "1",
optionsMonths: [ optionsMonths: [
{ {
value: "1", value: "2023-01-00 00:00:00",
label: "1月", label: "1月",
}, },
{ {
value: "2", value: "2023-02-00 00:00:00",
label: "2月", label: "2月",
}, },
{ {
value: "3", value: "2023-03-00 00:00:00",
label: "3月", label: "3月",
}, },
{ {
value: "4", value: "2023-04-00 00:00:00",
label: "4月", label: "4月",
}, },
{ {
value: "5", value: "2023-05-00 00:00:00",
label: "5月", label: "5月",
}, },
{ {
value: "6", value: "2023-06-00 00:00:00",
label: "6月", label: "6月",
}, },
{ {
value: "7", value: "2023-07-00 00:00:00",
label: "7月", label: "7月",
}, },
{ {
value: "8", value: "2023-08-00 00:00:00",
label: "8月", label: "8月",
}, },
{ {
value: "9", value: "2023-09-00 00:00:00",
label: "9月", label: "9月",
}, },
{ {
value: "10", value: "2023-10-00 00:00:00",
label: "10月", label: "10月",
}, },
{ {
value: "11", value: "2023-11-00 00:00:00",
label: "11月", label: "11月",
}, },
{ {
value: "12", value: "2023-12-00 00:00:00",
label: "12月", label: "12月",
}, },
], ],
dateValue: "1", dateValue: '2023-01-00 00:00:00',
}; };
}, },
mounted() {
// this.$post('/perform/attend/appeal/stat', { appealTimeStart: this.dateValue }).then(res => {
// console.log(res)
// })
},
methods: {
}
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
...@@ -306,28 +294,35 @@ export default { ...@@ -306,28 +294,35 @@ export default {
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
/deep/.el-tabs__item { /deep/.el-tabs__item {
width: 120px; width: 120px;
font-size: 14px; font-size: 14px;
text-align: center; text-align: center;
} }
.content { .content {
width: 100%; width: 100%;
height: 730px; height: 730px;
overflow: hidden; overflow: hidden;
.search_box { .search_box {
width: 100%; width: 100%;
height: auto; height: auto;
text-align: right; text-align: right;
margin-bottom: 10px;
} }
.data_box { .data_box {
width: 100%; width: 100%;
height: 100%; height: 100%;
.top { .top {
width: 100%; width: 100%;
height: 380px; height: 380px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.box { .box {
width: 49%; width: 49%;
height: 100%; height: 100%;
......
...@@ -657,7 +657,7 @@ export default { ...@@ -657,7 +657,7 @@ export default {
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.117647058823529); box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.117647058823529);
-moz-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.117647058823529); -moz-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.117647058823529);
-webkit-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.117647058823529); -webkit-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.117647058823529);
margin: 0 20px 20px 0; margin: 10px 20px 20px 10px;
padding: 20px; padding: 20px;
.goal_title { .goal_title {
width: 100%; width: 100%;
......
...@@ -182,7 +182,6 @@ public class FeedbackApiController extends AbstractBaseController<FeedbackReq> { ...@@ -182,7 +182,6 @@ public class FeedbackApiController extends AbstractBaseController<FeedbackReq> {
model.put(PAGEINFO_KEY, pageInfo); model.put(PAGEINFO_KEY, pageInfo);
} }
public static void main(String[] args) { public static void main(String[] args) {
} }
......
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* @author: finegirl
* @date: 2021/7/16 11:50
* @description: //TODO 请完善注释信息
**/
public enum AppealStatTypeEnum {
申诉次数部门排名(1, "deptName"),
申诉次数个人排名(2, "staffName"),
申诉次数规则排名(3, "ruleName");
private int value;
private String desc;
private AppealStatTypeEnum(int value, String desc) {
this.value = value;
this.desc = desc;
}
public int getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static AppealStatTypeEnum getByValue(int value) {
AppealStatTypeEnum[] var1 = values();
int var2 = var1.length;
for(int var3 = 0; var3 < var2; ++var3) {
AppealStatTypeEnum examStatus = var1[var3];
if (examStatus.getValue() == value) {
return examStatus;
}
}
return null;
}
public static Map<String, String> getEnumMap(int... eItem) {
Map<String, String> resultMap = new LinkedHashMap();
AppealStatTypeEnum[] var2 = values();
int var3 = var2.length;
for(int var4 = 0; var4 < var3; ++var4) {
AppealStatTypeEnum item = var2[var4];
try {
boolean hasE = false;
int[] var7 = eItem;
int var8 = eItem.length;
for(int var9 = 0; var9 < var8; ++var9) {
int e = var7[var9];
if (item.getValue() == e) {
hasE = true;
break;
}
}
if (!hasE) {
resultMap.put(item.getValue() + "", item.getDesc());
}
} catch (Exception var11) {
}
}
return resultMap;
}
}
\ No newline at end of file
...@@ -11,7 +11,8 @@ import java.util.Map; ...@@ -11,7 +11,8 @@ import java.util.Map;
public enum SubMethodEnum { public enum SubMethodEnum {
系统自动(1, "系统自动"), 系统自动(1, "系统自动"),
人工添加(2, "人工添加"), 人工添加(2, "人工添加"),
大厅巡查(3, "大厅巡查"); 大厅巡查(3, "大厅巡查"),
申诉冲销(4, "申诉冲销");
private Integer value; private Integer value;
private String desc; private String desc;
......
...@@ -110,7 +110,7 @@ public class CheckAttendRecordEntity extends CheckAttendRecordVo { ...@@ -110,7 +110,7 @@ public class CheckAttendRecordEntity extends CheckAttendRecordVo {
*/ */
private Integer checkStatus; private Integer checkStatus;
/** /**
* 扣分方式(1.系统自动,2.人工添加,3.大厅巡查) * 扣分方式(1.系统自动,2.人工添加,3.大厅巡查,4.申诉冲销)
*/ */
private Integer subMethod; private Integer subMethod;
/** /**
......
package com.mortals.xhx.module.perform.dao; package com.mortals.xhx.module.perform.dao;
import com.mortals.framework.dao.ICRUDDao; import com.mortals.framework.dao.ICRUDDao;
import com.mortals.framework.model.PageInfo;
import com.mortals.xhx.module.perform.model.PerformAttendAppealEntity; import com.mortals.xhx.module.perform.model.PerformAttendAppealEntity;
import com.mortals.xhx.module.perform.model.vo.AppealInfo;
import java.util.List; import java.util.List;
/** /**
* 绩效记录申诉信息Dao * 绩效记录申诉信息Dao
...@@ -13,5 +16,7 @@ import java.util.List; ...@@ -13,5 +16,7 @@ import java.util.List;
public interface PerformAttendAppealDao extends ICRUDDao<PerformAttendAppealEntity,Long>{ public interface PerformAttendAppealDao extends ICRUDDao<PerformAttendAppealEntity,Long>{
String SQLID_GET_STATLIST = "getStatList";
List<AppealInfo> getStatList(PerformAttendAppealEntity query, PageInfo pageInfo);
} }
package com.mortals.xhx.module.perform.dao.ibatis; package com.mortals.xhx.module.perform.dao.ibatis;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.ParamDto;
import com.mortals.xhx.module.perform.model.vo.AppealInfo;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.perform.dao.PerformAttendAppealDao; import com.mortals.xhx.module.perform.dao.PerformAttendAppealDao;
import com.mortals.xhx.module.perform.model.PerformAttendAppealEntity; import com.mortals.xhx.module.perform.model.PerformAttendAppealEntity;
...@@ -17,5 +21,14 @@ import java.util.List; ...@@ -17,5 +21,14 @@ import java.util.List;
public class PerformAttendAppealDaoImpl extends BaseCRUDDaoMybatis<PerformAttendAppealEntity,Long> implements PerformAttendAppealDao { public class PerformAttendAppealDaoImpl extends BaseCRUDDaoMybatis<PerformAttendAppealEntity,Long> implements PerformAttendAppealDao {
@Override
public List<AppealInfo> getStatList(PerformAttendAppealEntity query, PageInfo pageInfo) {
ParamDto queryParam = super.getQueryParam(query);
if (pageInfo.getPrePageResult() == -1) {
return getSqlSession().selectList(SQLID_GET_STATLIST, queryParam);
} else {
RowBounds rowBounds = new RowBounds(pageInfo.getBeginIndex(), pageInfo.getPrePageResult());
return getSqlSession().selectList(SQLID_GET_STATLIST, queryParam, rowBounds);
}
}
} }
package com.mortals.xhx.module.perform.model.vo;
import lombok.Data;
@Data
public class AppealInfo {
private String staffName;
private String deptName;
private String ruleName;
private Integer number;
}
package com.mortals.xhx.module.perform.model.vo; package com.mortals.xhx.module.perform.model.vo;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.perform.model.PerformAttendAppealEntity;
import java.util.ArrayList;
import java.util.List;
import lombok.Data; import lombok.Data;
import com.mortals.framework.annotation.Excel;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
* 绩效记录申诉信息视图对象 * 绩效记录申诉信息视图对象
...@@ -16,4 +13,13 @@ import java.util.Date; ...@@ -16,4 +13,13 @@ import java.util.Date;
@Data @Data
public class PerformAttendAppealVo extends BaseEntityLong { public class PerformAttendAppealVo extends BaseEntityLong {
/**
* 时间
*/
private String appealTimeStart;
/**
* 统计类型(1.申诉次数部门排名,2.申诉次数个人排名,3.申诉次数规则排名)
*/
private Integer statType;
} }
\ No newline at end of file
package com.mortals.xhx.module.perform.service; package com.mortals.xhx.module.perform.service;
import com.mortals.framework.common.Rest;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.perform.model.PerformAttendAppealEntity; import com.mortals.xhx.module.perform.model.PerformAttendAppealEntity;
import com.mortals.xhx.module.perform.dao.PerformAttendAppealDao; import com.mortals.xhx.module.perform.dao.PerformAttendAppealDao;
import com.mortals.xhx.module.perform.model.vo.AppealInfo;
import java.util.List;
/** /**
* PerformAttendAppealService * PerformAttendAppealService
* * <p>
* 绩效记录申诉信息 service接口 * 绩效记录申诉信息 service接口
* *
* @author zxfei * @author zxfei
* @date 2023-07-12 * @date 2023-07-12
*/ */
public interface PerformAttendAppealService extends ICRUDService<PerformAttendAppealEntity,Long>{ public interface PerformAttendAppealService extends ICRUDService<PerformAttendAppealEntity, Long> {
PerformAttendAppealDao getDao(); PerformAttendAppealDao getDao();
Rest<Void> audit(PerformAttendAppealEntity appeal, Context context);
Rest<List<AppealInfo>> stat(PerformAttendAppealEntity appeal, Context context);
} }
\ No newline at end of file
...@@ -43,7 +43,6 @@ public class PerformRulesServiceImpl extends AbstractCRUDCacheServiceImpl<Perfor ...@@ -43,7 +43,6 @@ public class PerformRulesServiceImpl extends AbstractCRUDCacheServiceImpl<Perfor
@Override @Override
protected void saveBefore(PerformRulesEntity entity, Context context) throws AppException { protected void saveBefore(PerformRulesEntity entity, Context context) throws AppException {
if (ObjectUtils.isEmpty(entity.getRuleCode())) { if (ObjectUtils.isEmpty(entity.getRuleCode())) {
String ruleCode = ""; String ruleCode = "";
/* /*
if (PerformRulesTypeEnum.考勤绩效.getValue() == entity.getType()) { if (PerformRulesTypeEnum.考勤绩效.getValue() == entity.getType()) {
...@@ -52,22 +51,22 @@ public class PerformRulesServiceImpl extends AbstractCRUDCacheServiceImpl<Perfor ...@@ -52,22 +51,22 @@ public class PerformRulesServiceImpl extends AbstractCRUDCacheServiceImpl<Perfor
*/ */
switch (PerformRulesTypeEnum.getByValue(entity.getType())) { switch (PerformRulesTypeEnum.getByValue(entity.getType())) {
case 考勤绩效: case 考勤绩效:
ruleCode = PerformRulesTypeEnum.getByValue(entity.getType()).getDesc().toUpperCase() + "_" + idgeneratorService.getLongId(ATTEND_KEY); ruleCode = PerformRulesTypeEnum.getByValue(entity.getType()).getDesc().toUpperCase() + idgeneratorService.getLongId(ATTEND_KEY);
break; break;
case 评价差评绩效: case 评价差评绩效:
ruleCode = PerformRulesTypeEnum.getByValue(entity.getType()).getDesc().toUpperCase() + "_" + idgeneratorService.getLongId(REVIEW_KEY); ruleCode = PerformRulesTypeEnum.getByValue(entity.getType()).getDesc().toUpperCase() + idgeneratorService.getLongId(REVIEW_KEY);
break; break;
case 评价投诉绩效: case 评价投诉绩效:
ruleCode = PerformRulesTypeEnum.getByValue(entity.getType()).getDesc().toUpperCase() + "_" + idgeneratorService.getLongId(COMPLAIN_KEY); ruleCode = PerformRulesTypeEnum.getByValue(entity.getType()).getDesc().toUpperCase() + idgeneratorService.getLongId(COMPLAIN_KEY);
break; break;
case 办件绩效: case 办件绩效:
ruleCode = PerformRulesTypeEnum.getByValue(entity.getType()).getDesc().toUpperCase() + "_" + idgeneratorService.getLongId(GOWORK_KEY); ruleCode = PerformRulesTypeEnum.getByValue(entity.getType()).getDesc().toUpperCase() + idgeneratorService.getLongId(GOWORK_KEY);
break; break;
case 效能绩效: case 效能绩效:
ruleCode = PerformRulesTypeEnum.getByValue(entity.getType()).getDesc().toUpperCase() + "_" + idgeneratorService.getLongId(EFFECT_KEY); ruleCode = PerformRulesTypeEnum.getByValue(entity.getType()).getDesc().toUpperCase() + idgeneratorService.getLongId(EFFECT_KEY);
break; break;
case 其它绩效: case 其它绩效:
ruleCode = PerformRulesTypeEnum.getByValue(entity.getType()).getDesc().toUpperCase() + "_" + idgeneratorService.getLongId(OTHER_KEY); ruleCode = PerformRulesTypeEnum.getByValue(entity.getType()).getDesc().toUpperCase() + idgeneratorService.getLongId(OTHER_KEY);
break; break;
default: default:
throw new AppException("绩效类型不支持!"); throw new AppException("绩效类型不支持!");
......
package com.mortals.xhx.module.perform.web; package com.mortals.xhx.module.perform.web;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.EnabledEnum;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.module.perform.model.vo.AppealInfo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.perform.model.PerformAttendAppealEntity; import com.mortals.xhx.module.perform.model.PerformAttendAppealEntity;
import com.mortals.xhx.module.perform.service.PerformAttendAppealService; import com.mortals.xhx.module.perform.service.PerformAttendAppealService;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils; import com.mortals.framework.util.StringUtils;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import java.util.Arrays; import java.util.Arrays;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*; import static com.mortals.framework.ap.SysConstains.*;
/** /**
* * 绩效记录申诉信息
* 绩效记录申诉信息 *
* * @author zxfei
* @author zxfei * @date 2023-07-12
* @date 2023-07-12 */
*/
@RestController @RestController
@RequestMapping("perform/attend/appeal") @RequestMapping("perform/attend/appeal")
public class PerformAttendAppealController extends BaseCRUDJsonBodyMappingController<PerformAttendAppealService,PerformAttendAppealEntity,Long> { public class PerformAttendAppealController extends BaseCRUDJsonBodyMappingController<PerformAttendAppealService, PerformAttendAppealEntity, Long> {
@Autowired @Autowired
private ParamService paramService; private ParamService paramService;
public PerformAttendAppealController(){ public PerformAttendAppealController() {
super.setModuleDesc( "绩效记录申诉信息"); super.setModuleDesc("绩效记录申诉信息");
} }
@Override @Override
protected void init(Map<String, Object> model, Context context) { protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "subMethod", paramService.getParamBySecondOrganize("PerformAttendAppeal","subMethod")); this.addDict(model, "subMethod", paramService.getParamBySecondOrganize("PerformAttendAppeal", "subMethod"));
this.addDict(model, "subAddType", paramService.getParamBySecondOrganize("PerformAttendAppeal","subAddType")); this.addDict(model, "subAddType", paramService.getParamBySecondOrganize("PerformAttendAppeal", "subAddType"));
this.addDict(model, "processStatus", paramService.getParamBySecondOrganize("PerformAttendAppeal","processStatus")); this.addDict(model, "processStatus", paramService.getParamBySecondOrganize("PerformAttendAppeal", "processStatus"));
this.addDict(model, "appealResult", paramService.getParamBySecondOrganize("PerformAttendAppeal","appealResult")); this.addDict(model, "appealResult", paramService.getParamBySecondOrganize("PerformAttendAppeal", "appealResult"));
this.addDict(model, "reviewResult", paramService.getParamBySecondOrganize("PerformAttendAppeal","reviewResult")); this.addDict(model, "reviewResult", paramService.getParamBySecondOrganize("PerformAttendAppeal", "reviewResult"));
this.addDict(model, "reviewSource", paramService.getParamBySecondOrganize("PerformAttendAppeal","reviewSource")); this.addDict(model, "reviewSource", paramService.getParamBySecondOrganize("PerformAttendAppeal", "reviewSource"));
this.addDict(model, "irregularType", paramService.getParamBySecondOrganize("PerformAttendAppeal","irregularType")); this.addDict(model, "irregularType", paramService.getParamBySecondOrganize("PerformAttendAppeal", "irregularType"));
this.addDict(model, "irregularOtherType", paramService.getParamBySecondOrganize("PerformAttendAppeal","irregularOtherType")); this.addDict(model, "irregularOtherType", paramService.getParamBySecondOrganize("PerformAttendAppeal", "irregularOtherType"));
super.init(model, context); super.init(model, context);
} }
/**
* 申诉统计
*/
@PostMapping(value = "stat")
public String appealStat(@RequestBody PerformAttendAppealEntity appeal) {
JSONObject jsonObject = new JSONObject();
String busiDesc = this.getModuleDesc() + "统计";
try {
Rest<List<AppealInfo>> rest = this.service.stat(appeal, getContext());
if (rest.getCode() == YesNoEnum.NO.getValue()) {
throw new AppException("统计异常!");
} else {
jsonObject.put(KEY_RESULT_DATA, rest.getData());
}
recordSysLog(request, busiDesc + " 【成功】");
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
} catch (Exception e) {
log.error("申诉审核", e);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
jsonObject.put(KEY_RESULT_MSG, super.convertException(e));
}
return jsonObject.toJSONString();
}
/**
* 申诉审核
*/
@PostMapping(value = "audit")
public String appealAudit(@RequestBody PerformAttendAppealEntity appeal) {
JSONObject jsonObject = new JSONObject();
String busiDesc = this.getModuleDesc() + "审核";
try {
Rest<Void> audit = this.service.audit(appeal, getContext());
if (audit.getCode() == YesNoEnum.NO.getValue()) {
throw new AppException("申诉审核异常!");
}
recordSysLog(request, busiDesc + " 【成功】");
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
} catch (Exception e) {
log.error("申诉审核", e);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
jsonObject.put(KEY_RESULT_MSG, super.convertException(e));
}
return jsonObject.toJSONString();
}
} }
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.perform.dao.ibatis.PerformAttendAppealDaoImpl">
<!-- 字段和属性映射 -->
<resultMap type="com.mortals.xhx.module.perform.model.vo.AppealInfo" id="AppealInfo-Map">
<result property="staffName" column="staffName" />
<result property="deptName" column="deptName" />
<result property="ruleName" column="ruleName" />
<result property="number" column="number" />
</resultMap>
<!-- 获取统计列表 -->
<select id="getStatList" parameterType="paramDto" resultMap="AppealInfo-Map">
select
<!-- 获取分组字段 -->
<if test="groupList != null and !groupList.isEmpty()">
<foreach collection="groupList" open="" close="" index="index" item="item">
${item},
</foreach>
</if>
count(IFNULL(a.id,0)) number
from mortals_xhx_perform_attend_appeal as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
<include refid="_group_by_"/>
<include refid="_orderCols_"/>
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment