Commit 5471582d authored by 王启林's avatar 王启林
parents a7b218b3 9c655777
......@@ -224,100 +224,24 @@ export default {
type: [],
resource: "",
},
config: {
data: [
{
name: "部门1",
value: 95,
},
{
name: "部门2",
value: 90,
},
{
name: "部门3",
value: 98,
},
{
name: "部门4",
value: 91,
},
{
name: "部门5",
value: 80,
},
{
name: "部门6",
value: 92,
},
{
name: "部门7",
value: 93,
},
{
name: "部门8",
value: 94,
},
{
name: "部门9",
value: 90,
},
{
name: "部门10",
value: 100,
},
],
},
personConfig: {
data: [
{
name: "个人1",
value: 95,
},
{
name: "个人2",
value: 90,
},
{
name: "个人3",
value: 98,
},
{
name: "个人4",
value: 91,
},
{
name: "个人5",
value: 80,
},
{
name: "个人6",
value: 92,
},
{
name: "个人7",
value: 93,
},
{
name: "个人8",
value: 94,
},
{
name: "个人9",
value: 90,
},
{
name: "个人10",
value: 100,
},
],
},
config: {},//部门绩效总分top10
personConfig: {},//个人绩效总分top10
cricleData: [
{ value: 756, name: "考勤绩效" },
{ value: 690, name: "评价绩效" },
{ value: 559, name: "办件绩效" },
{ value: 1278, name: "效能绩效" },
],
// 个人绩效总分排名
staffQuery:{
page:1,
size:10,
},
// 部门
depQuery:{
page:1,
size:10,
},
};
},
......@@ -326,9 +250,48 @@ export default {
this.drawRulePie();
this.drawCorePie();
this.drawRecordPie();
this.staffStatList()
this.depStatList()
},
methods: {
// 个人绩效总分排名
staffStatList(){
this.$post("/staff/perform/stat/list", this.staffQuery).then((res) => {
const {code,data} = res
if(code == 1){
const row = data.data || []
const depArr = []
row.forEach(element => {
depArr.push({
name:element.staffName,
value:element.totalScore
})
});
this.personConfig = {data:depArr}
console.log(row,"个人")
}
});
},
// 部门绩效总分排名
depStatList(){
this.$post("/dept/perform/stat/list", this.depQuery).then((res) => {
const {code,data} = res
if(code == 1){
const row = data.data || []
const depArr = []
row.forEach(element => {
depArr.push({
name:element.deptName,
value:element.totalScore
})
});
this.config = {data:depArr}
// console.log(row,depArr,"部门")
}
});
},
drawLeiDa() {
// 基于dom,初始化echarts实例
let myChart = this.$echarts.init(document.getElementById("leida"));
......
......@@ -367,9 +367,9 @@ export default {
width: 100,
formatter: (row) => {
if (row.check) {
return <span>不选择</span>;
return <span style="cursor:pointer;color:#ff0000">不选择</span>;
} else {
return <span style="cursor:pointer">选择</span>;
return <span style="cursor:pointer;color:#1890ff">选择</span>;
}
},
},
......
......@@ -407,9 +407,9 @@ export default {
width: 100,
formatter: (row) => {
if (row.check) {
return <span>不选择</span>;
return <span style="cursor:pointer;color:#ff0000">不选择</span>;
} else {
return <span style="cursor:pointer">选择</span>;
return <span style="cursor:pointer;color:#1890ff">选择</span>;
}
},
},
......
......@@ -12,7 +12,7 @@
+ {{ type == 1 ? "新增考核部门" : "新增考核个人" }}</el-button
>
</div>
<div class="mid_content">
<div class="mid_content" style="height: auto;">
<div class="goal_box" v-for="(val, i) in dataList" :key="i">
<div class="goal_title">
<img src="../../../../assets/images/u17641.svg" alt="" />
......@@ -321,7 +321,7 @@ export default {
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);
margin: 0 20px 20px 0;
margin: 10px 20px 10px 20px;
padding: 20px;
.goal_title {
width: 100%;
......
......@@ -193,9 +193,9 @@ export default {
width: 100,
formatter: (row) => {
if (row.check) {
return <span>不选择</span>;
return <span style="cursor:pointer;color:#ff0000">不选择</span>;
} else {
return <span style="cursor:pointer">选择</span>;
return <span style="cursor:pointer;color:#1890ff">选择</span>;
}
},
},
......
......@@ -224,7 +224,7 @@ export default {
const x = []
const y = []
row.forEach(element => {
x.push(element.deptName)
x.push(element.staffName)
y.push(element.totalScore)
});
this.depStatObj.totalScore.x = x
......@@ -241,13 +241,30 @@ export default {
const x = []
const y = []
row.forEach(element => {
x.push(element.deptName)
x.push(element.staffName)
y.push(element.attendScoreAdd)
});
this.depStatObj.attendScoreAdd.x = x
this.depStatObj.attendScoreAdd.y = y
}
});
// 减分
const top10Sub = {...this.boardQuery,size:10,orderColList:[{colName:'totalSubScore',sortKind:'desc'}]}
this.$post("/staff/perform/stat/list", top10Sub).then((res) => {
const {code,data,dict} = res
if(code == 1){
const row = data.data || []
// this.statArr = row
const x = []
const y = []
row.forEach(element => {
x.push(element.staffName)
y.push(element.totalSubScore)
});
this.depStatObj.totalSubScore.x = x
this.depStatObj.totalSubScore.y = y
}
});
},
// 部门绩效分数统计
statList(){
......@@ -274,7 +291,7 @@ export default {
});
// 加分top10
const top10 = {...this.boardQuery,size:10,orderColList:[{colName:'totalAddScore',sortKind:'desc'}]}
this.$post("/staff/perform/stat/list", top10).then((res) => {
this.$post("/dept/perform/stat/list", top10).then((res) => {
const {code,data,dict} = res
if(code == 1){
const row = data.data || []
......@@ -292,7 +309,7 @@ export default {
});
// 减分
const top10Sub = {...this.boardQuery,size:10,orderColList:[{colName:'totalSubScore',sortKind:'desc'}]}
this.$post("/staff/perform/stat/list", top10Sub).then((res) => {
this.$post("/dept/perform/stat/list", top10Sub).then((res) => {
const {code,data,dict} = res
if(code == 1){
const row = data.data || []
......@@ -334,7 +351,7 @@ export default {
const x = []
const y = []
row.forEach(element => {
x.push(element.deptName)
x.push(element.staffName)
y.push(element[this.value])
});
this.depStatObj.alignment.x = x
......
......@@ -21,8 +21,6 @@ public abstract class BaseReq implements Serializable {
/**
* 工号
*/
......@@ -42,6 +40,9 @@ public abstract class BaseReq implements Serializable {
* 规则编码
*/
private String ruleCode;
private Long ruleId;
private String phone;
......@@ -51,4 +52,7 @@ public abstract class BaseReq implements Serializable {
private String performType;
private Long staffId;
}
......@@ -13,6 +13,8 @@ import com.mortals.framework.exception.AppException;
import com.mortals.xhx.busiz.dingtalk.config.TalkConfiguration;
import com.mortals.xhx.busiz.dingtalk.req.DingTalkBaseReq;
import com.mortals.xhx.busiz.dingtalk.req.UserPageReq;
import com.mortals.xhx.busiz.req.CodeReq;
import com.mortals.xhx.busiz.req.LinkMessageReq;
import com.mortals.xhx.busiz.req.MobileReq;
import com.mortals.xhx.busiz.req.ReviewSaveReq;
import com.mortals.xhx.common.code.YesNoEnum;
......@@ -131,9 +133,9 @@ public class TalkApiController {
if(dingToken == null){
dingToken = getToken().getData();
}
req.setDeptId(res.getDeptid());
req.setCursor(res.getCursor());
req.setSize(res.getSize());
req.setDeptId(res.getDeptid()); //部门id
req.setCursor(res.getCursor()); //起始页游标
req.setSize(res.getSize()); //分页条数
OapiV2UserListResponse rsp = client.execute(req, dingToken);
if(rsp.getErrcode() == 0){
apiRespPdu.setCode(0);
......@@ -173,11 +175,12 @@ public class TalkApiController {
if(dingToken == null){
dingToken = getToken().getData();
}
req.setMobile(mobile.getMobile());
req.setMobile(mobile.getMobile()); //用户手机号
//先根据手机号去获取userid 再通过userid获取详情 钉钉没有直接根据电话获取用户详情的接口
OapiV2UserGetbymobileResponse rsp = client.execute(req, dingToken);
if(rsp.getErrcode() == 0){
//根据获取到的userid去获取用户详情
ApiRespPdu<OapiV2UserGetResponse.UserGetResponse> userRsp = getUserInfo(rsp.getResult().getUserid());
ApiRespPdu<OapiV2UserGetResponse.UserGetResponse> userRsp = getUserInfoByUserId(rsp.getResult().getUserid());
if(userRsp.getCode() == 0){
apiRespPdu.setCode(userRsp.getCode());
apiRespPdu.setData(userRsp.getData());
......@@ -211,17 +214,17 @@ public class TalkApiController {
* 根据userid查询用户详情
* @return
*/
@GetMapping("/dingtalk/getUserInfo")
@GetMapping("/dingtalk/getUserInfoByUserId")
@UnAuth
public ApiRespPdu<OapiV2UserGetResponse.UserGetResponse> getUserInfo(@RequestBody String userid){
public ApiRespPdu<OapiV2UserGetResponse.UserGetResponse> getUserInfoByUserId(@RequestBody String userid){
ApiRespPdu<OapiV2UserGetResponse.UserGetResponse> apiRespPdu = new ApiRespPdu<>();
try {
DingTalkClient client = new DefaultDingTalkClient(talkConfiguration.getGetuserinfo());
DingTalkClient client = new DefaultDingTalkClient(talkConfiguration.getGetuserinfobyuserid());
OapiV2UserGetRequest req = new OapiV2UserGetRequest();
if(dingToken == null){
dingToken = getToken().getData();
}
req.setUserid(userid);
req.setUserid(userid); //用户id
OapiV2UserGetResponse rsp = client.execute(req, dingToken);
apiRespPdu.setCode(0);
......@@ -236,4 +239,85 @@ public class TalkApiController {
return apiRespPdu;
}
/**
* 推送链接类钉钉工作消息
* @return
*/
@PostMapping("/dingtalk/sendLinkMessage")
@UnAuth
public ApiRespPdu<String> sendLinkMessage(@RequestBody LinkMessageReq linkMessageReq){
ApiRespPdu<String> apiRespPdu = new ApiRespPdu<>();
try {
DingTalkClient client = new DefaultDingTalkClient(talkConfiguration.getSendmessage());
if(dingToken == null){
dingToken = getToken().getData();
}
OapiMessageCorpconversationAsyncsendV2Request req = new OapiMessageCorpconversationAsyncsendV2Request();
req.setAgentId(Long.valueOf(talkConfiguration.getGetAgentId()));
req.setUseridList(linkMessageReq.getUserIdList());
OapiMessageCorpconversationAsyncsendV2Request.Msg obj1 = new OapiMessageCorpconversationAsyncsendV2Request.Msg();
obj1.setMsgtype("link"); //type为链接类消息
OapiMessageCorpconversationAsyncsendV2Request.Link obj2 = new OapiMessageCorpconversationAsyncsendV2Request.Link();
obj2.setPicUrl(linkMessageReq.getPicUrl()); //消息图片地址
obj2.setMessageUrl(linkMessageReq.getMessageUrl()); //跳转链接地址
obj2.setText(linkMessageReq.getText()); //消息描述
obj2.setTitle(linkMessageReq.getTitle()); //消息title
obj1.setLink(obj2);
req.setMsg(obj1);
OapiMessageCorpconversationAsyncsendV2Response rsp = client.execute(req, dingToken);
if(rsp.getErrcode() == 0){
apiRespPdu.setCode(0);
apiRespPdu.setData(rsp.getBody());
apiRespPdu.setMsg(rsp.getMsg());
}else {
apiRespPdu.setCode(-1);
apiRespPdu.setData(rsp.getBody());
apiRespPdu.setMsg(rsp.getMsg());
}
} catch (Exception e) {
e.printStackTrace();
apiRespPdu.setCode(-1);
apiRespPdu.setData("");
apiRespPdu.setMsg(e.toString());
}
return apiRespPdu;
}
/**
* 根据免登码查询用户详情
* @return
*/
@GetMapping("/dingtalk/getUserInfoByCode")
@UnAuth
public ApiRespPdu<OapiV2UserGetuserinfoResponse.UserGetByCodeResponse> getUserInfoByCode(@RequestBody CodeReq codeReq){
ApiRespPdu<OapiV2UserGetuserinfoResponse.UserGetByCodeResponse> apiRespPdu = new ApiRespPdu<>();
try {
DingTalkClient client = new DefaultDingTalkClient(talkConfiguration.getGetuserinfobycode());
OapiV2UserGetuserinfoRequest req = new OapiV2UserGetuserinfoRequest();
if(dingToken == null){
dingToken = getToken().getData();
}
req.setCode(codeReq.getCode()); //前端js获取到的免登码 用免登码获取用户信息
OapiV2UserGetuserinfoResponse rsp = client.execute(req, dingToken);
apiRespPdu.setCode(0);
apiRespPdu.setData(rsp.getResult());
apiRespPdu.setMsg(rsp.getMsg());
} catch (Exception e) {
e.printStackTrace();
apiRespPdu.setCode(-1);
apiRespPdu.setData(null);
apiRespPdu.setMsg(e.toString());
}
return apiRespPdu;
}
}
......@@ -58,8 +58,21 @@ public class TalkConfiguration {
/**
* 根据userid查询用户信息
*/
@Value("${dingtalk.getuserinfo:https://oapi.dingtalk.com/topapi/v2/user/get}")
private String getuserinfo;
@Value("${dingtalk.getuserinfobyuserid:https://oapi.dingtalk.com/topapi/v2/user/get}")
private String getuserinfobyuserid;
/**
* 根据免登码查询用户信息
*/
@Value("${dingtalk.getuserinfobycode:https://oapi.dingtalk.com/topapi/v2/user/getuserinfo}")
private String getuserinfobycode;
/**
* 推送钉钉工作消息
*/
@Value("${dingtalk.sendmessage:https://oapi.dingtalk.com/topapi/message/corpconversation/asyncsend_v2}")
private String sendmessage;
/**
* getDeptbyUser
*/
......
package com.mortals.xhx.busiz.req;
/**
* @author ZYW
* @date 2023-07-13 20:11
*/
public class CodeReq {
String code;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
}
......@@ -9,6 +9,7 @@ import java.util.Date;
@Data
public class InspectSaveReq extends BaseReq {
//考勤
/**
* 所属考勤组ID
*/
......@@ -42,8 +43,116 @@ public class InspectSaveReq extends BaseReq {
*/
private String errorResult;
//评价
/**
* 评价结果(1.非常不满意,2.差评)
*/
private Integer reviewResult;
/**
* 评价时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
private Date reviewTime;
/**
* 评价来源(窗口评价系统,导视系统,自助服务系统,微官网,其它)
*/
private String reviewSource;
/**
* 评价设备
*/
private String reviewDevice;
//投诉
/**
* 投诉标题
*/
private String complainTitle;
/**
* 投诉内容
*/
private String complainContent;
/**
* 投诉人真实姓名
*/
private String complainRealName;
/**
* 联系电话
*/
private String contact;
/**
* 投诉时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
private Date complainTime;
/**
* 投诉来源
*/
private String complainSource;
/**
* 投诉设备
*/
private String complainDevice;
//办件
/**
* 办件编码
*/
private String goworkCode;
/**
* 办件所属部门
*/
private String goworkDepts;
/**
* 事项名称
*/
private String matterlName;
/**
* 办理时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
private Date goworkTime;
//效能
/**
* 违规类型(1.脱岗,2.离岗,3.玩手机,4.睡觉)
*/
private Integer irregularType;
/**
* 发生时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
private Date happenTime;
/**
* 持续时间,秒
*/
private Integer duration;
/**
* 报警时间
*/
private Date alarmTime;
//其它
/**
* 违规类型(1.工作纪律)
*/
private Integer irregularOtherType;
// /**
// * 发生时间
// */
// @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
// private Date happenTime;
/**
* 评分标准
*/
private String ruleDesc;
private Long checkRecordId;
}
package com.mortals.xhx.busiz.req;
/**
* @author ZYW
* @date 2023-07-13 19:30
* 连接类工作消息
*/
public class LinkMessageReq {
String userIdList; //接收者用户id列表 多个接收者用,隔开
String picUrl; //消息图片地址
String messageUrl; //链接地址
String title; //消息标题,建议100字符以内。
String text; //消息描述,建议500字符以内。
public String getUserIdList() {
return userIdList;
}
public void setUserIdList(String userIdList) {
this.userIdList = userIdList;
}
public String getPicUrl() {
return picUrl;
}
public void setPicUrl(String picUrl) {
this.picUrl = picUrl;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public String getMessageUrl() {
return messageUrl;
}
public void setMessageUrl(String messageUrl) {
this.messageUrl = messageUrl;
}
}
......@@ -19,5 +19,9 @@ public class PerformReq extends BaseReq {
private Long id;
private Integer processStatus;
private Integer scoreType;
}
......@@ -18,7 +18,7 @@ public class ReviewSaveReq extends BaseReq {
* 评价时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
private Date reviewTime;
private String reviewTime;
/**
* 评价来源(窗口评价系统,导视系统,自助服务系统,微官网,其它)
*/
......
package com.mortals.xhx.busiz.rsp;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class InspectStatInfo {
/**
* 累计次数
*/
private Integer totalTimes;
/**
* 今日次数
*/
private Integer todayTimes;
}
......@@ -217,4 +217,8 @@ public class PerformDetailInfo {
private Integer irregularOtherType;
/**
* 申诉状态(0.未申诉,1.申诉中,2.申诉拒绝,3.申诉通过)
*/
private Integer appealStatus;
}
......@@ -176,6 +176,9 @@ public class AppealApiController extends AbstractBaseController<PerformReq> {
Rest<PerformAttendAppealEntity> rest = Rest.ok(busiDesc + " 【成功】");
Context context = this.getContext();
try {
if (ObjectUtils.isEmpty(context) || ObjectUtils.isEmpty(context.getUser())) {
throw new AppException(ERROR_TOKEN_EXPIRED, ERROR_TOKEN_EXPIRED_CONTENT);
}
//根据状态 查询 当前是否已经存在正在进行的申诉
if (ObjectUtils.isEmpty(req.getId())) throw new AppException("核查记录Id不能为空!");
if (ObjectUtils.isEmpty(req.getPerformType())) throw new AppException("绩效类型不能为空!");
......@@ -218,6 +221,9 @@ public class AppealApiController extends AbstractBaseController<PerformReq> {
entity.setPerformAttendAppealFilesList(req.getPerformAttendAppealFilesList());
entity.setProcessStatus(1);
entity.setAppealDesc(req.getAppealDesc());
entity.setStaffId(context.getUser().getCustomerId());
entity.setCreateUserId(context.getUser().getId());
PerformAttendAppealEntity saveEntity = appealService.save(entity, context);
rest.setData(saveEntity);
recordSysLog(request, busiDesc + " 【成功】");
......
......@@ -105,6 +105,8 @@ public class FeedbackApiController extends AbstractBaseController<FeedbackReq> {
model.put(PAGEINFO_KEY, pageAllInfo);
parsePageInfo(model, pageAllInfo);
rest.setData(model);
recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) {
log.error(busiDesc, e);
......
......@@ -167,9 +167,12 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
performInfo.setPerformType(PerformTypeEnum.考勤绩效.getValue());
//判断是否存在申诉
PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(item.getId()));
if (!ObjectUtils.isEmpty(entity)) {
Boolean bool = entity.newEntity();
updateAppealStatus(performInfo, bool, entity.getProcessStatus(), entity.getAppealResult());
} else {
performInfo.setAppealStatus(AppealStatusEnum.未申诉.getValue());
}
return performInfo;
}).collect(Collectors.toList());
......@@ -190,9 +193,13 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
performInfo.setPerformType(PerformTypeEnum.评价差评绩效.getValue());
//判断是否存在申诉
PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(item.getId()));
if (!ObjectUtils.isEmpty(entity)) {
Boolean bool = entity.newEntity();
updateAppealStatus(performInfo, bool, entity.getProcessStatus(), entity.getAppealResult());
} else {
performInfo.setAppealStatus(AppealStatusEnum.未申诉.getValue());
}
return performInfo;
}).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect);
......@@ -212,8 +219,12 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
//判断是否存在申诉
PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(item.getId()));
if (!ObjectUtils.isEmpty(entity)) {
Boolean bool = entity.newEntity();
updateAppealStatus(performInfo, bool, entity.getProcessStatus(), entity.getAppealResult());
} else {
performInfo.setAppealStatus(AppealStatusEnum.未申诉.getValue());
}
return performInfo;
}).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect);
......@@ -232,8 +243,14 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
performInfo.setPerformType(PerformTypeEnum.办件绩效.getValue());
//判断是否存在申诉
PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(item.getId()));
if (!ObjectUtils.isEmpty(entity)) {
Boolean bool = entity.newEntity();
updateAppealStatus(performInfo, bool, entity.getProcessStatus(), entity.getAppealResult());
} else {
performInfo.setAppealStatus(AppealStatusEnum.未申诉.getValue());
}
return performInfo;
}).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect);
......@@ -252,8 +269,12 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
performInfo.setPerformType(PerformTypeEnum.效能绩效.getValue());
//判断是否存在申诉
PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(item.getId()));
if (!ObjectUtils.isEmpty(entity)) {
Boolean bool = entity.newEntity();
updateAppealStatus(performInfo, bool, entity.getProcessStatus(), entity.getAppealResult());
} else {
performInfo.setAppealStatus(AppealStatusEnum.未申诉.getValue());
}
return performInfo;
}).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect);
......@@ -272,8 +293,13 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
performInfo.setPerformType(PerformTypeEnum.其它绩效.getValue());
//判断是否存在申诉
PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(item.getId()));
if (!ObjectUtils.isEmpty(entity)) {
Boolean bool = entity.newEntity();
updateAppealStatus(performInfo, bool, entity.getProcessStatus(), entity.getAppealResult());
} else {
performInfo.setAppealStatus(AppealStatusEnum.未申诉.getValue());
}
return performInfo;
}).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect);
......@@ -327,6 +353,7 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
if (PerformTypeEnum.考勤绩效.getValue().equals(performReq.getPerformType())) {
CheckAttendRecordEntity checkEntity = checkAttendRecordService.get(performReq.getId(), context);
BeanUtils.copyProperties(checkEntity, performDetailInfo, BeanUtil.getNullPropertyNames(checkEntity));
} else if (PerformTypeEnum.评价差评绩效.getValue().equals(performReq.getPerformType())) {
CheckReviewRecordEntity checkEntity = checkReviewRecordService.get(performReq.getId(), context);
BeanUtils.copyProperties(checkEntity, performDetailInfo, BeanUtil.getNullPropertyNames(checkEntity));
......@@ -346,6 +373,21 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
throw new AppException("不支持当前绩效类型");
}
PerformAttendAppealEntity appealEntity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(performDetailInfo.getId()));
if (ObjectUtils.isEmpty(appealEntity)) {
performDetailInfo.setAppealStatus(AppealStatusEnum.未申诉.getValue());
} else {
if (ProcessStatusEnum.未处理.getValue() == appealEntity.getProcessStatus()) {
performDetailInfo.setAppealStatus(AppealStatusEnum.申诉中.getValue());
} else {
if (AppealResultEnum.通过.getValue() == appealEntity.getProcessStatus()) {
performDetailInfo.setAppealStatus(AppealStatusEnum.申诉通过.getValue());
} else if (AppealResultEnum.不通过.getValue() == appealEntity.getProcessStatus()) {
performDetailInfo.setAppealStatus(AppealStatusEnum.申诉拒绝.getValue());
}
}
}
rest.setData(performDetailInfo);
recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) {
......
......@@ -23,21 +23,22 @@ public class TestController {
@Autowired
private IdgeneratorService idgeneratorService;
@GetMapping("webservice")
// @GetMapping("webservice")@GetMapping("idGens")
// public String idGens() {
// log.info("测试id生成");
//
// String stringId = idgeneratorService.getLongId(IdgeneratorServiceImpl.IdGeneratorKey.EFFECT).toString();
//
//
// return stringId;
// }
public String webservice() {
log.info("测试");
return "ok";
}
@GetMapping("idGens")
public String idGens() {
log.info("测试id生成");
String stringId = idgeneratorService.getLongId(IdgeneratorServiceImpl.IdGeneratorKey.EFFECT_KEY).toString();
return stringId;
}
//
......
......@@ -4,7 +4,7 @@ import java.util.LinkedHashMap;
import java.util.Map;
/***
* 核查类型枚举(1.考勤绩效,2.效能绩效,3.评价绩效,4.办件绩效,5.评价差评绩效,6.其它绩效)
* 核查类型枚举(1.考勤绩效,2.评价绩效,3.办件绩效,4.效能绩效,5.其它绩效,6.投诉绩效)
*/
public enum CheckTypeEnum {
考勤绩效(1, "考勤绩效"),
......@@ -12,6 +12,7 @@ public enum CheckTypeEnum {
办件绩效(3, "办件绩效"),
效能绩效(4, "效能绩效"),
其它绩效(5, "其它绩效"),
投诉绩效(6, "投诉绩效"),
;
private Integer value;
private String desc;
......
......@@ -69,4 +69,7 @@ public class CheckAllRecordVo extends BaseEntityLong {
* 核查类型(1.考勤绩效,2.效能绩效,3.评价绩效,4.办件绩效,5.评价差评绩效,6.其它绩效)
*/
private Integer checkType;
private String performType;
}
package com.mortals.xhx.module.check.web;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.CheckStatusEnum;
import com.mortals.xhx.common.code.CheckTypeEnum;
import com.mortals.xhx.common.code.SubAddTypeEnum;
import com.mortals.xhx.common.code.SubMethodEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.check.model.CheckAttendRecordEntity;
import com.mortals.xhx.module.check.service.CheckAttendRecordService;
import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import java.util.Arrays;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*;
/**
*
* 考勤绩效记录核查信息
*
* @author zxfei
* @date 2023-07-10
*/
* 考勤绩效记录核查信息
*
* @author zxfei
* @date 2023-07-10
*/
@RestController
@RequestMapping("check/attend/record")
public class CheckAttendRecordController extends BaseCRUDJsonBodyMappingController<CheckAttendRecordService,CheckAttendRecordEntity,Long> {
public class CheckAttendRecordController extends BaseCRUDJsonBodyMappingController<CheckAttendRecordService, CheckAttendRecordEntity, Long> {
@Autowired
private ParamService paramService;
public CheckAttendRecordController(){
super.setModuleDesc( "考勤绩效记录核查信息");
public CheckAttendRecordController() {
super.setModuleDesc("考勤绩效记录核查信息");
}
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "subAddType", paramService.getParamBySecondOrganize("CheckAttendRecord","subAddType"));
this.addDict(model, "checkStatus", paramService.getParamBySecondOrganize("CheckAttendRecord","checkStatus"));
this.addDict(model, "subMethod", paramService.getParamBySecondOrganize("CheckAttendRecord","subMethod"));
this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap());
this.addDict(model, "subMethod", SubMethodEnum.getEnumMap());
this.addDict(model, "subAddType", SubAddTypeEnum.getEnumMap());
this.addDict(model, "checkType", CheckTypeEnum.getEnumMap());
super.init(model, context);
}
@Override
protected void doListBefore(CheckAttendRecordEntity query, Map<String, Object> model, Context context) throws AppException {
if (ObjectUtils.isEmpty(query.getOrderColList())) {
query.setOrderColList(Arrays.asList(new OrderCol("createTime", OrderCol.DESCENDING)));
} else {
query.getOrderColList().add(new OrderCol("createTime", OrderCol.DESCENDING));
}
super.doListBefore(query, model, context);
}
/**
* 审核
*
* @param entity
* @return
*/
......
package com.mortals.xhx.module.check.web;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.CheckStatusEnum;
import com.mortals.xhx.common.code.CheckTypeEnum;
import com.mortals.xhx.common.code.SubAddTypeEnum;
import com.mortals.xhx.common.code.SubMethodEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
......@@ -42,12 +49,24 @@ public class CheckComplainRecordController extends BaseCRUDJsonBodyMappingContro
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "subMethod", paramService.getParamBySecondOrganize("CheckComplainRecord","subMethod"));
this.addDict(model, "checkStatus", paramService.getParamBySecondOrganize("CheckComplainRecord","checkStatus"));
this.addDict(model, "subAddType", paramService.getParamBySecondOrganize("CheckComplainRecord","subAddType"));
this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap());
this.addDict(model, "subMethod", SubMethodEnum.getEnumMap());
this.addDict(model, "subAddType", SubAddTypeEnum.getEnumMap());
this.addDict(model, "checkType", CheckTypeEnum.getEnumMap());
super.init(model, context);
}
@Override
protected void doListBefore(CheckComplainRecordEntity query, Map<String, Object> model, Context context) throws AppException {
super.doListBefore(query, model, context);
if (ObjectUtils.isEmpty(query.getOrderColList())) {
query.setOrderColList(Arrays.asList(new OrderCol("createTime", OrderCol.DESCENDING)));
} else {
query.getOrderColList().add(new OrderCol("createTime", OrderCol.DESCENDING));
}
}
/**
* 审核
* @param entity
......
package com.mortals.xhx.module.check.web;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.CheckStatusEnum;
import com.mortals.xhx.common.code.CheckTypeEnum;
import com.mortals.xhx.common.code.SubAddTypeEnum;
import com.mortals.xhx.common.code.SubMethodEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
......@@ -43,12 +50,25 @@ public class CheckEffectRecordController extends BaseCRUDJsonBodyMappingControll
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "irregularType", paramService.getParamBySecondOrganize("CheckEffectRecord","irregularType"));
this.addDict(model, "subMethod", paramService.getParamBySecondOrganize("CheckEffectRecord","subMethod"));
this.addDict(model, "checkStatus", paramService.getParamBySecondOrganize("CheckEffectRecord","checkStatus"));
this.addDict(model, "subAddType", paramService.getParamBySecondOrganize("CheckEffectRecord","subAddType"));
this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap());
this.addDict(model, "subMethod", SubMethodEnum.getEnumMap());
this.addDict(model, "subAddType", SubAddTypeEnum.getEnumMap());
this.addDict(model, "checkType", CheckTypeEnum.getEnumMap());
super.init(model, context);
}
@Override
protected void doListBefore(CheckEffectRecordEntity query, Map<String, Object> model, Context context) throws AppException {
super.doListBefore(query, model, context);
if (ObjectUtils.isEmpty(query.getOrderColList())) {
query.setOrderColList(Arrays.asList(new OrderCol("createTime", OrderCol.DESCENDING)));
} else {
query.getOrderColList().add(new OrderCol("createTime", OrderCol.DESCENDING));
}
}
/**
* 审核
* @param entity
......
package com.mortals.xhx.module.check.web;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.CheckStatusEnum;
import com.mortals.xhx.common.code.CheckTypeEnum;
import com.mortals.xhx.common.code.SubAddTypeEnum;
import com.mortals.xhx.common.code.SubMethodEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
......@@ -42,12 +49,24 @@ public class CheckGoworkRecordController extends BaseCRUDJsonBodyMappingControll
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "subMethod", paramService.getParamBySecondOrganize("CheckGoworkRecord","subMethod"));
this.addDict(model, "checkStatus", paramService.getParamBySecondOrganize("CheckGoworkRecord","checkStatus"));
this.addDict(model, "subAddType", paramService.getParamBySecondOrganize("CheckGoworkRecord","subAddType"));
this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap());
this.addDict(model, "subMethod", SubMethodEnum.getEnumMap());
this.addDict(model, "subAddType", SubAddTypeEnum.getEnumMap());
this.addDict(model, "checkType", CheckTypeEnum.getEnumMap());
super.init(model, context);
}
@Override
protected void doListBefore(CheckGoworkRecordEntity query, Map<String, Object> model, Context context) throws AppException {
super.doListBefore(query, model, context);
if (ObjectUtils.isEmpty(query.getOrderColList())) {
query.setOrderColList(Arrays.asList(new OrderCol("createTime", OrderCol.DESCENDING)));
} else {
query.getOrderColList().add(new OrderCol("createTime", OrderCol.DESCENDING));
}
}
/**
* 审核
* @param entity
......
package com.mortals.xhx.module.check.web;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.CheckStatusEnum;
import com.mortals.xhx.common.code.CheckTypeEnum;
import com.mortals.xhx.common.code.SubAddTypeEnum;
import com.mortals.xhx.common.code.SubMethodEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
......@@ -43,12 +50,23 @@ public class CheckOtherRecordController extends BaseCRUDJsonBodyMappingControlle
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "irregularOtherType", paramService.getParamBySecondOrganize("CheckOtherRecord","irregularOtherType"));
this.addDict(model, "subMethod", paramService.getParamBySecondOrganize("CheckOtherRecord","subMethod"));
this.addDict(model, "checkStatus", paramService.getParamBySecondOrganize("CheckOtherRecord","checkStatus"));
this.addDict(model, "subAddType", paramService.getParamBySecondOrganize("CheckOtherRecord","subAddType"));
this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap());
this.addDict(model, "subMethod", SubMethodEnum.getEnumMap());
this.addDict(model, "subAddType", SubAddTypeEnum.getEnumMap());
this.addDict(model, "checkType", CheckTypeEnum.getEnumMap());
super.init(model, context);
}
@Override
protected void doListBefore(CheckOtherRecordEntity query, Map<String, Object> model, Context context) throws AppException {
super.doListBefore(query, model, context);
if (ObjectUtils.isEmpty(query.getOrderColList())) {
query.setOrderColList(Arrays.asList(new OrderCol("createTime", OrderCol.DESCENDING)));
} else {
query.getOrderColList().add(new OrderCol("createTime", OrderCol.DESCENDING));
}
}
/**
* 审核
* @param entity
......
package com.mortals.xhx.module.check.web;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.CheckStatusEnum;
import com.mortals.xhx.common.code.CheckTypeEnum;
import com.mortals.xhx.common.code.SubAddTypeEnum;
import com.mortals.xhx.common.code.SubMethodEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
......@@ -44,12 +51,25 @@ public class CheckReviewRecordController extends BaseCRUDJsonBodyMappingControll
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "reviewResult", paramService.getParamBySecondOrganize("CheckReviewRecord","reviewResult"));
this.addDict(model, "reviewSource", paramService.getParamBySecondOrganize("CheckReviewRecord","reviewSource"));
this.addDict(model, "subMethod", paramService.getParamBySecondOrganize("CheckReviewRecord","subMethod"));
this.addDict(model, "checkStatus", paramService.getParamBySecondOrganize("CheckReviewRecord","checkStatus"));
this.addDict(model, "subAddType", paramService.getParamBySecondOrganize("CheckReviewRecord","subAddType"));
this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap());
this.addDict(model, "subMethod", SubMethodEnum.getEnumMap());
this.addDict(model, "subAddType", SubAddTypeEnum.getEnumMap());
this.addDict(model, "checkType", CheckTypeEnum.getEnumMap());
super.init(model, context);
}
@Override
protected void doListBefore(CheckReviewRecordEntity query, Map<String, Object> model, Context context) throws AppException {
super.doListBefore(query, model, context);
if (ObjectUtils.isEmpty(query.getOrderColList())) {
query.setOrderColList(Arrays.asList(new OrderCol("createTime", OrderCol.DESCENDING)));
} else {
query.getOrderColList().add(new OrderCol("createTime", OrderCol.DESCENDING));
}
}
/**
* 审核
* @param entity
......
......@@ -21,10 +21,10 @@ public interface FeedbackDao extends ICRUDDao<FeedbackEntity,Long>{
/***
* 问卷反馈人员列表
* @param feedbackId
* @param query
* @return
*/
List<FeedbackStaffInfoVo> getFeedbackStaffList(Long feedbackId);
Result<FeedbackStaffInfoVo> getFeedbackStaffList(FeedbackEntity query,PageInfo pageInfo);
/**
* 问卷单选多选反馈统计
......
......@@ -28,8 +28,29 @@ public class FeedbackDaoImpl extends BaseCRUDDaoMybatis<FeedbackEntity,Long> imp
@Override
public List<FeedbackStaffInfoVo> getFeedbackStaffList(Long feedbackId) {
return this.getSqlSession().selectList(this.getSqlId("getFeedbackStaffList"), feedbackId);
public Result<FeedbackStaffInfoVo> getFeedbackStaffList(FeedbackEntity query,PageInfo pageInfo) {
String sqlId = "getFeedbackStaffList";
Result result = new Result();
List list = null;
int count = this.getFeedbackStaffListCount(query);
if (count == 0) {
list = new ArrayList();
} else if (pageInfo.getPrePageResult() == -1) {
list = this.getSqlSession().selectList(this.getSqlId(sqlId), query);
} else {
if (pageInfo.getBeginIndex() > count) {
pageInfo.setCurrPage(1);
}
RowBounds rowBounds = new RowBounds(pageInfo.getBeginIndex(), pageInfo.getPrePageResult());
list = this.getSqlSession().selectList(this.getSqlId(sqlId), query, rowBounds);
}
pageInfo.setTotalResult(count);
result.setPageInfo(pageInfo);
result.setList((List)list);
return result;
}
@Override
......@@ -66,4 +87,8 @@ public class FeedbackDaoImpl extends BaseCRUDDaoMybatis<FeedbackEntity,Long> imp
private int getQuestionAnswerListCount(Long questionId) {
return (Integer)this.getSqlSession().selectOne(this.getSqlId("getQuestionAnswerListCount"), questionId);
}
private int getFeedbackStaffListCount(FeedbackEntity query) {
return (Integer)this.getSqlSession().selectOne(this.getSqlId("getFeedbackStaffListCount"), query);
}
}
......@@ -15,5 +15,6 @@ import java.util.Date;
*/
@Data
public class FeedbackAnswerVo extends BaseEntityLong {
/** 问题内容**/
private String questionContent;
}
\ No newline at end of file
......@@ -17,6 +17,10 @@ import java.util.Date;
public class FeedbackVo extends BaseEntityLong {
private List<Long> staffList;
/** 问题Id */
private Long questionId;
/** 反馈Id */
private Long feedbackId;
/** 反馈状态 */
private Integer backStatus;
}
\ No newline at end of file
......@@ -2,6 +2,8 @@ package com.mortals.xhx.module.feedback.model.vo;
import lombok.Data;
import java.util.List;
/**
* 问卷单选多选反馈统计视图
*/
......@@ -36,4 +38,6 @@ public class OptionSummaryVo {
* 选项统计
*/
private Integer optionCount;
List<OptionSummaryVo> optionList;
}
......@@ -25,10 +25,10 @@ public interface FeedbackService extends ICRUDService<FeedbackEntity,Long>{
/***
* 问卷反馈人员列表
* @param feedbackId
* @param query
* @return
*/
List<FeedbackStaffInfoVo> getFeedbackStaffList(Long feedbackId) throws AppException;
Result<FeedbackStaffInfoVo> getFeedbackStaffList(FeedbackEntity query,PageInfo pageInfo) throws AppException;
/**
* 问卷单选多选反馈统计
......
package com.mortals.xhx.module.feedback.service.impl;
import com.mortals.framework.model.PageInfo;
import com.mortals.xhx.module.feedback.model.FeedbackQuestionEntity;
import com.mortals.xhx.module.feedback.service.FeedbackQuestionService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
......@@ -27,6 +31,8 @@ import lombok.extern.slf4j.Slf4j;
public class FeedbackAnswerServiceImpl extends AbstractCRUDServiceImpl<FeedbackAnswerDao, FeedbackAnswerEntity, Long> implements FeedbackAnswerService {
@Autowired
private FeedbackAnswerOptionService feedbackAnswerOptionService;
@Autowired
private FeedbackQuestionService feedbackQuestionService;
@Override
protected void saveAfter(FeedbackAnswerEntity entity, Context context) throws AppException {
......@@ -64,4 +70,17 @@ public class FeedbackAnswerServiceImpl extends AbstractCRUDServiceImpl<FeedbackA
feedbackAnswerOptionService.removeList(feedbackAnswerOptionlist,context);
super.removeAfter(ids, context, result);
}
@Override
protected void findAfter(FeedbackAnswerEntity params, PageInfo pageInfo, Context context, List<FeedbackAnswerEntity> list) throws AppException {
if(CollectionUtils.isNotEmpty(list)){
for(FeedbackAnswerEntity item:list){
FeedbackQuestionEntity questionEntity = feedbackQuestionService.get(item.getQuestionId());
if(questionEntity!=null){
item.setQuestionContent(questionEntity.getContent());
}
}
}
super.findAfter(params, pageInfo, context, list);
}
}
\ No newline at end of file
......@@ -35,8 +35,8 @@ public class FeedbackQuestionServiceImpl extends AbstractCRUDServiceImpl<Feedbac
item.setQuestionId(entity.getId());
item.setCreateUserId(this.getContextUserId(context));
item.setCreateTime(new Date());
feedbackOptionService.save(item);
}).count();
feedbackOptionService.save(entity.getFeedbackOptionList());
}
super.saveAfter(entity, context);
}
......
......@@ -52,7 +52,9 @@ public class FeedbackServiceImpl extends AbstractCRUDServiceImpl<FeedbackDao, Fe
item.setCreateUserId(this.getContextUserId(context));
item.setCreateTime(new Date());
}).count();
feedbackQuestionService.save(entity.getFeedbackQuestionList());
for(FeedbackQuestionEntity questionEntity:entity.getFeedbackQuestionList()) {
feedbackQuestionService.save(questionEntity);
}
}
if(!ObjectUtils.isEmpty(entity.getStaffList())){
List<FeedbackStaffEntity> staffEntityList = new ArrayList<>();
......@@ -81,7 +83,9 @@ public class FeedbackServiceImpl extends AbstractCRUDServiceImpl<FeedbackDao, Fe
item.setUpdateUserId(this.getContextUserId(context));
item.setUpdateTime(new Date());
}).count();
feedbackQuestionService.save(entity.getFeedbackQuestionList());
for(FeedbackQuestionEntity questionEntity:entity.getFeedbackQuestionList()) {
feedbackQuestionService.save(questionEntity);
}
}
if(!ObjectUtils.isEmpty(entity.getStaffList())){
Long[] feedbackStaffIds = feedbackStaffService.find(new FeedbackStaffQuery().feedbackId(entity.getId())).stream().map(FeedbackStaffEntity::getId).toArray(Long[]::new);
......@@ -110,11 +114,14 @@ public class FeedbackServiceImpl extends AbstractCRUDServiceImpl<FeedbackDao, Fe
}
@Override
public List<FeedbackStaffInfoVo> getFeedbackStaffList(Long feedbackId) throws AppException {
if(feedbackId==null){
public Result<FeedbackStaffInfoVo> getFeedbackStaffList(FeedbackEntity query,PageInfo pageInfo) throws AppException {
if(query.getFeedbackId()==null){
throw new AppException("绩效反馈记录Id不能为空");
}
return dao.getFeedbackStaffList(feedbackId);
if(pageInfo==null){
pageInfo = new PageInfo();
}
return dao.getFeedbackStaffList(query,pageInfo);
}
@Override
......
package com.mortals.xhx.module.feedback.web;
import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.module.feedback.model.FeedbackAnswerEntity;
import com.mortals.xhx.module.feedback.model.*;
import com.mortals.xhx.module.feedback.model.vo.FeedbackStaffInfoVo;
import com.mortals.xhx.module.feedback.model.vo.OptionSummaryVo;
import com.mortals.xhx.module.feedback.model.vo.QuestionAnswerVo;
import com.mortals.xhx.module.feedback.service.FeedbackOptionService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
......@@ -19,16 +21,13 @@ import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.feedback.model.FeedbackEntity;
import com.mortals.xhx.module.feedback.service.FeedbackService;
import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import java.util.Arrays;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*;
......@@ -46,6 +45,9 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
@Autowired
private ParamService paramService;
@Autowired
private FeedbackOptionService feedbackOptionService;
public FeedbackController(){
super.setModuleDesc( "绩效反馈记录信息");
}
......@@ -61,14 +63,25 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
super.init(model, context);
}
@Override
protected int infoAfter(Long id, Map<String, Object> model, FeedbackEntity entity, Context context) throws AppException {
if(CollectionUtils.isNotEmpty(entity.getFeedbackQuestionList())){
for(FeedbackQuestionEntity item:entity.getFeedbackQuestionList()){
List<FeedbackOptionEntity> optionEntities = feedbackOptionService.find(new FeedbackOptionQuery().questionId(item.getId()));
item.setFeedbackOptionList(optionEntities);
}
}
return super.infoAfter(id, model, entity, context);
}
/**
* 查询问卷反馈人员列表
* @param feedbackId
* @param query
* @return
*/
@RequestMapping(value = {"getStaffList"},method = {RequestMethod.POST, RequestMethod.GET})
@PostMapping({"getStaffList"})
@UnAuth
public Rest<Object> getFeedbackStaffList(Long feedbackId) {
public Rest<Object> getFeedbackStaffList(@RequestBody FeedbackEntity query) {
Rest<Object> ret = new Rest();
Map<String, Object> model = new HashMap();
Context context = this.getContext();
......@@ -76,9 +89,10 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
int code=1;
try {
List<FeedbackStaffInfoVo> result = this.getService().getFeedbackStaffList(feedbackId);
if(CollectionUtils.isNotEmpty(result)) {
Map<Integer, List<FeedbackStaffInfoVo>> groupMap = result.stream().collect(Collectors.groupingBy(FeedbackStaffInfoVo::getBackStatus));
PageInfo pageInfo = this.buildPageInfo(query);
Result<FeedbackStaffInfoVo> result = this.getService().getFeedbackStaffList(query,pageInfo);
if(CollectionUtils.isNotEmpty(result.getList())) {
Map<Integer, List<FeedbackStaffInfoVo>> groupMap = result.getList().stream().collect(Collectors.groupingBy(FeedbackStaffInfoVo::getBackStatus));
if(groupMap.containsKey(1)) {
model.put("feedBack", groupMap.get(1).size());
}else {
......@@ -93,8 +107,9 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
model.put("feedBack", 0);
model.put("notBack", 0);
}
model.put("data", result);
model.put("message_info", busiDesc + "成功");
model.put("data", result.getList());
model.put("pageInfo", result.getPageInfo());
this.parsePageInfo(model, result.getPageInfo());
if (!ObjectUtils.isEmpty(context) && !ObjectUtils.isEmpty(context.getUser())) {
this.recordSysLog(this.request, busiDesc + " 【成功】");
}
......@@ -126,7 +141,21 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
int code=1;
try {
List<OptionSummaryVo> result = this.getService().getOptionSummaryList(feedbackId);
model.put("data", result);
List<OptionSummaryVo> list = new ArrayList<>();
if(CollectionUtils.isNotEmpty(result)) {
Map<Long, List<OptionSummaryVo>> groupMap = result.stream().collect(Collectors.groupingBy(OptionSummaryVo::getQuestionId));
for (Long key : groupMap.keySet()) {
OptionSummaryVo vo = new OptionSummaryVo();
OptionSummaryVo temp = groupMap.get(key).get(0);
vo.setQuestionId(key);
vo.setQuestion(temp.getQuestion());
vo.setFeedbackId(temp.getFeedbackId());
vo.setQuestionType(temp.getQuestionType());
vo.setOptionList(groupMap.get(key));
list.add(vo);
}
}
model.put("data", list);
model.put("message_info", busiDesc + "成功");
if (!ObjectUtils.isEmpty(context) && !ObjectUtils.isEmpty(context.getUser())) {
this.recordSysLog(this.request, busiDesc + " 【成功】");
......@@ -156,14 +185,13 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
Context context = this.getContext();
String busiDesc = "查询问卷问题反馈详情";
int code=1;
int code = 1;
try {
PageInfo pageInfo = this.buildPageInfo(query);
Result<QuestionAnswerVo> result = this.getService().getQuestionAnswerList(query.getQuestionId(), pageInfo);
model.put("data", result.getList());
model.put("pageInfo", result.getPageInfo());
this.parsePageInfo(model, result.getPageInfo());
code = this.doListAfter(query, (Map)model, context);
model.put("message_info", busiDesc + "成功");
if (!ObjectUtils.isEmpty(context) && !ObjectUtils.isEmpty(context.getUser())) {
this.recordSysLog(this.request, busiDesc + " 【成功】");
......
package com.mortals.xhx.module.perform.service.impl;
import com.mortals.xhx.common.code.CheckStatusEnum;
import com.mortals.xhx.common.code.SubMethodEnum;
import com.mortals.xhx.common.utils.BeanUtil;
......@@ -18,12 +19,12 @@ import lombok.extern.slf4j.Slf4j;
import java.util.Date;
/**
* PerformAttendRecordService
* 考勤绩效记录信息 service实现
*
* @author zxfei
* @date 2023-07-10
*/
* PerformAttendRecordService
* 考勤绩效记录信息 service实现
*
* @author zxfei
* @date 2023-07-10
*/
@Service("performAttendRecordService")
@Slf4j
public class PerformAttendRecordServiceImpl extends AbstractCRUDServiceImpl<PerformAttendRecordDao, PerformAttendRecordEntity, Long> implements PerformAttendRecordService {
......@@ -35,28 +36,29 @@ public class PerformAttendRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
protected void saveAfter(PerformAttendRecordEntity entity, Context context) throws AppException {
CheckAttendRecordEntity checkAttendRecordEntity = new CheckAttendRecordEntity();
checkAttendRecordEntity.initAttrValue();
BeanUtils.copyProperties(entity,checkAttendRecordEntity, BeanUtil.getNullPropertyNames(entity));
BeanUtils.copyProperties(entity, checkAttendRecordEntity, BeanUtil.getNullPropertyNames(entity));
checkAttendRecordEntity.setId(null);
checkAttendRecordEntity.setRecordId(entity.getId());
if(entity.getSubMethod()== SubMethodEnum.系统自动.getValue()){
if (entity.getSubMethod() == SubMethodEnum.系统自动.getValue()) {
checkAttendRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue()); //自动扣分相设置为已处理
}else {
} else {
checkAttendRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
}
checkAttendRecordService.save(checkAttendRecordEntity,context);
checkAttendRecordEntity.setCheckTime(new Date());
checkAttendRecordService.save(checkAttendRecordEntity, context);
}
@Override
public void updateProcessStatus(Long id, Integer status) throws AppException {
if(id==null){
if (id == null) {
throw new AppException("考勤绩效记录Id不能为空");
}
PerformAttendRecordEntity entity = this.get(id);
if(entity==null){
if (entity == null) {
throw new AppException("无效的考勤绩效记录Id");
}
if(status==null){
status=1; //处理状态(1.未核查,2.已核查)
if (status == null) {
status = 1; //处理状态(1.未核查,2.已核查)
}
PerformAttendRecordEntity update = new PerformAttendRecordEntity();
update.setId(id);
......
......@@ -43,6 +43,7 @@ public class PerformComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Pe
}else {
checkComplainRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
}
checkComplainRecordEntity.setCheckTime(new Date());
checkComplainRecordService.save(checkComplainRecordEntity,context);
}
......
......@@ -43,6 +43,7 @@ public class PerformEffectRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
}else {
checkEffectRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
}
checkEffectRecordEntity.setCheckTime(new Date());
checkEffectRecordService.save(checkEffectRecordEntity,context);
}
......
......@@ -43,6 +43,7 @@ public class PerformGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
}else {
checkGoworkRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
}
checkGoworkRecordEntity.setCheckTime(new Date());
checkGoworkRecordService.save(checkGoworkRecordEntity,context);
}
......
......@@ -43,6 +43,7 @@ public class PerformOtherRecordServiceImpl extends AbstractCRUDServiceImpl<Perfo
}else {
checkOtherRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
}
checkOtherRecordEntity.setCheckTime(new Date());
checkOtherRecordService.save(checkOtherRecordEntity,context);
}
......
......@@ -42,6 +42,9 @@ public class PerformReviewRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
}else {
checkReviewRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
}
//checkReviewRecordEntity.s
checkReviewRecordService.save(checkReviewRecordEntity,context);
}
......
......@@ -2,12 +2,14 @@ package com.mortals.xhx.module.perform.web;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
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.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
......@@ -66,6 +68,16 @@ public class PerformAttendAppealController extends BaseCRUDJsonBodyMappingContro
super.init(model, context);
}
@Override
protected void doListBefore(PerformAttendAppealEntity query, Map<String, Object> model, Context context) throws AppException {
if (ObjectUtils.isEmpty(query.getOrderColList())) {
query.setOrderColList(Arrays.asList(new OrderCol("createTime", OrderCol.DESCENDING)));
} else {
query.getOrderColList().add(new OrderCol("createTime", OrderCol.DESCENDING));
}
}
/**
* 申诉统计
*/
......
package com.mortals.xhx.module.perform.web;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
......@@ -42,11 +46,22 @@ public class PerformAttendRecordController extends BaseCRUDJsonBodyMappingContro
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "subMethod", paramService.getParamBySecondOrganize("PerformAttendRecord","subMethod"));
this.addDict(model, "subAddType", paramService.getParamBySecondOrganize("PerformAttendRecord","subAddType"));
this.addDict(model, "processStatus", paramService.getParamBySecondOrganize("PerformAttendRecord","processStatus"));
this.addDict(model, "processStatus", ProcessStatusEnum.getEnumMap());
this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap());
this.addDict(model, "subMethod", SubMethodEnum.getEnumMap());
this.addDict(model, "subAddType", SubAddTypeEnum.getEnumMap());
this.addDict(model, "checkType", CheckTypeEnum.getEnumMap());
super.init(model, context);
}
@Override
protected void doListBefore(PerformAttendRecordEntity query, Map<String, Object> model, Context context) throws AppException {
super.doListBefore(query, model, context);
if (ObjectUtils.isEmpty(query.getOrderColList())) {
query.setOrderColList(Arrays.asList(new OrderCol("createTime", OrderCol.DESCENDING)));
} else {
query.getOrderColList().add(new OrderCol("createTime", OrderCol.DESCENDING));
}
}
}
\ No newline at end of file
package com.mortals.xhx.module.perform.web;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.*;
import org.apache.tomcat.jni.Proc;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
......@@ -42,9 +44,12 @@ public class PerformComplainRecordController extends BaseCRUDJsonBodyMappingCont
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "subMethod", paramService.getParamBySecondOrganize("PerformComplainRecord","subMethod"));
this.addDict(model, "processStatus", paramService.getParamBySecondOrganize("PerformComplainRecord","processStatus"));
this.addDict(model, "subAddType", paramService.getParamBySecondOrganize("PerformComplainRecord","subAddType"));
this.addDict(model, "processStatus", ProcessStatusEnum.getEnumMap());
this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap());
this.addDict(model, "subMethod", SubMethodEnum.getEnumMap());
this.addDict(model, "subAddType", SubAddTypeEnum.getEnumMap());
this.addDict(model, "checkType", CheckTypeEnum.getEnumMap());
super.init(model, context);
}
......
package com.mortals.xhx.module.perform.web;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
......@@ -43,11 +47,21 @@ public class PerformEffectRecordController extends BaseCRUDJsonBodyMappingContro
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "irregularType", paramService.getParamBySecondOrganize("PerformEffectRecord","irregularType"));
this.addDict(model, "subMethod", paramService.getParamBySecondOrganize("PerformEffectRecord","subMethod"));
this.addDict(model, "processStatus", paramService.getParamBySecondOrganize("PerformEffectRecord","processStatus"));
this.addDict(model, "subAddType", paramService.getParamBySecondOrganize("PerformEffectRecord","subAddType"));
this.addDict(model, "processStatus", ProcessStatusEnum.getEnumMap());
this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap());
this.addDict(model, "subMethod", SubMethodEnum.getEnumMap());
this.addDict(model, "subAddType", SubAddTypeEnum.getEnumMap());
this.addDict(model, "checkType", CheckTypeEnum.getEnumMap());
super.init(model, context);
}
@Override
protected void doListBefore(PerformEffectRecordEntity query, Map<String, Object> model, Context context) throws AppException {
if (ObjectUtils.isEmpty(query.getOrderColList())) {
query.setOrderColList(Arrays.asList(new OrderCol("createTime", OrderCol.DESCENDING)));
} else {
query.getOrderColList().add(new OrderCol("createTime", OrderCol.DESCENDING));
}
}
}
\ No newline at end of file
package com.mortals.xhx.module.perform.web;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
......@@ -42,11 +46,22 @@ public class PerformGoworkRecordController extends BaseCRUDJsonBodyMappingContro
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "subMethod", paramService.getParamBySecondOrganize("PerformGoworkRecord","subMethod"));
this.addDict(model, "processStatus", paramService.getParamBySecondOrganize("PerformGoworkRecord","processStatus"));
this.addDict(model, "subAddType", paramService.getParamBySecondOrganize("PerformGoworkRecord","subAddType"));
this.addDict(model, "processStatus", ProcessStatusEnum.getEnumMap());
this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap());
this.addDict(model, "subMethod", SubMethodEnum.getEnumMap());
this.addDict(model, "subAddType", SubAddTypeEnum.getEnumMap());
this.addDict(model, "checkType", CheckTypeEnum.getEnumMap());
super.init(model, context);
}
@Override
protected void doListBefore(PerformGoworkRecordEntity query, Map<String, Object> model, Context context) throws AppException {
if (ObjectUtils.isEmpty(query.getOrderColList())) {
query.setOrderColList(Arrays.asList(new OrderCol("createTime", OrderCol.DESCENDING)));
} else {
query.getOrderColList().add(new OrderCol("createTime", OrderCol.DESCENDING));
}
}
}
\ No newline at end of file
package com.mortals.xhx.module.perform.web;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
......@@ -43,11 +47,22 @@ public class PerformOtherRecordController extends BaseCRUDJsonBodyMappingControl
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "irregularOtherType", paramService.getParamBySecondOrganize("PerformOtherRecord","irregularOtherType"));
this.addDict(model, "subMethod", paramService.getParamBySecondOrganize("PerformOtherRecord","subMethod"));
this.addDict(model, "processStatus", paramService.getParamBySecondOrganize("PerformOtherRecord","processStatus"));
this.addDict(model, "subAddType", paramService.getParamBySecondOrganize("PerformOtherRecord","subAddType"));
this.addDict(model, "processStatus", ProcessStatusEnum.getEnumMap());
this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap());
this.addDict(model, "subMethod", SubMethodEnum.getEnumMap());
this.addDict(model, "subAddType", SubAddTypeEnum.getEnumMap());
this.addDict(model, "checkType", CheckTypeEnum.getEnumMap());
super.init(model, context);
}
@Override
protected void doListBefore(PerformOtherRecordEntity query, Map<String, Object> model, Context context) throws AppException {
if (ObjectUtils.isEmpty(query.getOrderColList())) {
query.setOrderColList(Arrays.asList(new OrderCol("createTime", OrderCol.DESCENDING)));
} else {
query.getOrderColList().add(new OrderCol("createTime", OrderCol.DESCENDING));
}
}
}
\ No newline at end of file
package com.mortals.xhx.module.perform.web;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
......@@ -44,11 +48,21 @@ public class PerformReviewRecordController extends BaseCRUDJsonBodyMappingContro
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "reviewResult", paramService.getParamBySecondOrganize("PerformReviewRecord","reviewResult"));
this.addDict(model, "reviewSource", paramService.getParamBySecondOrganize("PerformReviewRecord","reviewSource"));
this.addDict(model, "subMethod", paramService.getParamBySecondOrganize("PerformReviewRecord","subMethod"));
this.addDict(model, "processStatus", paramService.getParamBySecondOrganize("PerformReviewRecord","processStatus"));
this.addDict(model, "subAddType", paramService.getParamBySecondOrganize("PerformReviewRecord","subAddType"));
this.addDict(model, "processStatus", ProcessStatusEnum.getEnumMap());
this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap());
this.addDict(model, "subMethod", SubMethodEnum.getEnumMap());
this.addDict(model, "subAddType", SubAddTypeEnum.getEnumMap());
this.addDict(model, "checkType", CheckTypeEnum.getEnumMap());
super.init(model, context);
}
@Override
protected void doListBefore(PerformReviewRecordEntity query, Map<String, Object> model, Context context) throws AppException {
if (ObjectUtils.isEmpty(query.getOrderColList())) {
query.setOrderColList(Arrays.asList(new OrderCol("createTime", OrderCol.DESCENDING)));
} else {
query.getOrderColList().add(new OrderCol("createTime", OrderCol.DESCENDING));
}
}
}
\ No newline at end of file
package com.mortals.xhx.module.staff.model;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import cn.hutool.core.date.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.staff.model.vo.StaffPerformStatVo;
import lombok.Data;
/**
* 员工绩效统计实体对象
*
* @author zxfei
* @date 2023-07-11
*/
* 员工绩效统计实体对象
*
* @author zxfei
* @date 2023-07-13
*/
@Data
public class StaffPerformStatEntity extends StaffPerformStatVo {
private static final long serialVersionUID = 1L;
......@@ -20,28 +25,26 @@ public class StaffPerformStatEntity extends StaffPerformStatVo {
/**
* 部门id号
*/
private Long deptId;
private Long staffId;
/**
* 部门名称
*/
private String deptName;
private String staffName;
/**
* 员工绩效总分数
*/
@Excel(name = "员工绩效总分数")
private BigDecimal totalScore;
/**
* 备注
*/
private String remark;
/**
* 年
* 员工绩效加分总分数汇总
*/
private Integer year;
@Excel(name = "员工绩效加分总分数汇总")
private BigDecimal totalAddScore;
/**
* 月
* 员工绩效减分总分数汇总
*/
private Integer month;
@Excel(name = "员工绩效减分总分数汇总")
private BigDecimal totalSubScore;
/**
* 考勤绩效指标增加分数
*/
......@@ -58,6 +61,14 @@ public class StaffPerformStatEntity extends StaffPerformStatVo {
* 评价绩效指标扣减分数
*/
private BigDecimal assessScoreSub;
/**
* 投诉绩效指标增加分数
*/
private BigDecimal complainScoreAdd;
/**
* 投诉绩效指标扣减分数
*/
private BigDecimal complainScoreSub;
/**
* 办件绩效指标增加分数
*/
......@@ -83,31 +94,27 @@ public class StaffPerformStatEntity extends StaffPerformStatVo {
*/
private BigDecimal otherScoreSub;
/**
* 日
*/
private Integer day;
/**
* 员工绩效加分总分数汇总
* 备注
*/
@Excel(name = "员工绩效加分总分数汇总")
private BigDecimal totalAddScore;
private String remark;
/**
* 员工绩效减分总分数汇总
* 年
*/
@Excel(name = "员工绩效减分总分数汇总")
private BigDecimal totalSubScore;
private Integer year;
/**
* 投诉绩效指标增加分数
* 月
*/
private BigDecimal complainScoreAdd;
private Integer month;
/**
* 投诉绩效指标扣减分数
* 日
*/
private BigDecimal complainScoreSub;
private Integer day;
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
......@@ -120,19 +127,17 @@ public class StaffPerformStatEntity extends StaffPerformStatVo {
return false;
}
public void initAttrValue(){
public void initAttrValue() {
this.deptId = 0L;
this.staffId = 0L;
this.deptName = "";
this.staffName = "";
this.totalScore = new BigDecimal(0);
this.remark = "";
this.year = -1;
this.totalAddScore = new BigDecimal(0);
this.month = -1;
this.totalSubScore = new BigDecimal(0);
this.attendScoreAdd = new BigDecimal(0);
......@@ -142,6 +147,10 @@ public class StaffPerformStatEntity extends StaffPerformStatVo {
this.assessScoreSub = new BigDecimal(0);
this.complainScoreAdd = new BigDecimal(0);
this.complainScoreSub = new BigDecimal(0);
this.workScoreAdd = new BigDecimal(0);
this.workScoreSub = new BigDecimal(0);
......@@ -154,14 +163,12 @@ public class StaffPerformStatEntity extends StaffPerformStatVo {
this.otherScoreSub = new BigDecimal(0);
this.day = -1;
this.totalAddScore = new BigDecimal(0);
this.remark = "";
this.totalSubScore = new BigDecimal(0);
this.year = DateUtil.year(new Date());
this.complainScoreAdd = new BigDecimal(0);
this.month = DateUtil.month(new Date()) + 1;
this.complainScoreSub = new BigDecimal(0);
this.day = DateUtil.dayOfMonth(new Date());
}
}
\ No newline at end of file
......@@ -62,4 +62,7 @@ hik:
protocol: @profiles.hik.protocol@
appSecret: @profiles.hik.appSecret@
dingtalk:
agentId: 123123
agentId: 2652674890
AppKey: dingpqzradgfr4efdi2j
AppSecret: bF2WALmo5_Wuj3hg5gXeWqezrYnZChUJ88HjzNWpkA9ivdOxfBDGOGYcfVRfB3vd
......@@ -4,7 +4,7 @@
<mapper namespace="com.mortals.xhx.module.check.dao.ibatis.CheckAllRecordDaoImpl">
<select id="getList" parameterType="com.mortals.xhx.module.check.model.CheckAllRecordQuery" resultType="com.mortals.xhx.module.check.model.vo.CheckAllRecordVo">
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime,createTime AS deductTime,1 AS checkType FROM mortals_xhx_check_attend_record WHERE 1=1
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime,createTime AS deductTime,1 AS checkType ,'attend' AS performType FROM mortals_xhx_check_attend_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
......@@ -12,7 +12,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,2 AS subAddType,score,subMethod,checkTime,createTime AS deductTime,2 AS checkType FROM mortals_xhx_check_effect_record WHERE 1=1
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,2 AS subAddType,score,subMethod,checkTime,createTime AS deductTime,4 AS checkType ,'effect' AS performType FROM mortals_xhx_check_effect_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
......@@ -20,7 +20,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,2 AS subAddType,score,subMethod,checkTime,createTime AS deductTime,3 AS checkType FROM mortals_xhx_check_complain_record WHERE 1=1
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,2 AS subAddType,score,subMethod,checkTime,createTime AS deductTime,6 AS checkType ,'complain' AS performType FROM mortals_xhx_check_complain_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
......@@ -28,7 +28,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,2 AS subAddType,score,subMethod,checkTime,createTime AS deductTime,4 AS checkType FROM mortals_xhx_check_gowork_record WHERE 1=1
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,2 AS subAddType,score,subMethod,checkTime,createTime AS deductTime,3 AS checkType ,'gowork' AS performType FROM mortals_xhx_check_gowork_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
......@@ -36,7 +36,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,2 AS subAddType,score,subMethod,checkTime,createTime AS deductTime,5 AS checkType FROM mortals_xhx_check_review_record WHERE 1=1
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,2 AS subAddType,score,subMethod,checkTime,createTime AS deductTime,2 AS checkType ,'review' AS performType FROM mortals_xhx_check_review_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
......@@ -44,7 +44,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,2 AS subAddType,score,subMethod,checkTime,createTime AS deductTime,6 AS checkType FROM mortals_xhx_check_other_record WHERE 1=1
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,2 AS subAddType,score,subMethod,checkTime,createTime AS deductTime,5 AS checkType ,'other' AS performType FROM mortals_xhx_check_other_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
......
......@@ -4,7 +4,8 @@
<mapper namespace="com.mortals.xhx.module.feedback.dao.ibatis.FeedbackDaoImpl">
<!-- 问卷反馈人员列表 -->
<select id="getFeedbackStaffList" parameterType="long" resultType="com.mortals.xhx.module.feedback.model.vo.FeedbackStaffInfoVo">
<select id="getFeedbackStaffList" parameterType="com.mortals.xhx.module.feedback.model.FeedbackEntity" resultType="com.mortals.xhx.module.feedback.model.vo.FeedbackStaffInfoVo">
SELECT * FROM (
SELECT
s.feedbackId,
s.staffId,
......@@ -21,7 +22,38 @@
WHERE
s.feedbackId = #{feedbackId}
GROUP BY
s.staffId;
s.staffId
) AS t WHERE 1=1
<if test="backStatus != null">
AND t.backStatus = #{backStatus}
</if>
</select>
<select id="getFeedbackStaffListCount" parameterType="com.mortals.xhx.module.feedback.model.FeedbackEntity" resultType="int">
select count(1) from (
SELECT * FROM (
SELECT
s.feedbackId,
s.staffId,
s1.`name`,
s1.deptId,
s1.deptName,
s1.positionName,
CASE IFNULL(a.id, 0) WHEN 0 THEN 0 ELSE 1 END AS backStatus,
MAX(a.createTime) AS backTime
FROM
mortals_xhx_feedback_staff s
LEFT JOIN mortals_xhx_feedback_answer a ON s.staffId = a.staffId AND s.feedbackId = a.feedbackId
LEFT JOIN mortals_xhx_staff s1 ON s.staffId = s1.id
WHERE
s.feedbackId = #{feedbackId}
GROUP BY
s.staffId
) AS t WHERE 1=1
<if test="backStatus != null">
AND t.backStatus = #{backStatus}
</if>
) as tt
</select>
<!-- 问卷单选多选反馈统计 -->
......
......@@ -503,3 +503,40 @@ CREATE TABLE mortals_xhx_window_owner_detail(
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='窗口负责人详细';
-- ----------------------------
-- 员工绩效统计表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_staff_perform_stat`;
CREATE TABLE mortals_xhx_staff_perform_stat(
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID,主键,自增长',
`staffId` bigint(20) DEFAULT '0' COMMENT '部门id号',
`staffName` varchar(64) COMMENT '部门名称',
`totalScore` decimal(10,2) NOT NULL COMMENT '员工绩效总分数',
`totalAddScore` decimal(10,2) NOT NULL COMMENT '员工绩效加分总分数汇总',
`totalSubScore` decimal(10,2) NOT NULL COMMENT '员工绩效减分总分数汇总',
`attendScoreAdd` decimal(10,2) COMMENT '考勤绩效指标增加分数',
`attendScoreSub` decimal(10,2) COMMENT '考勤绩效指标扣减分数',
`assessScoreAdd` decimal(10,2) COMMENT '评价绩效指标增加分数',
`assessScoreSub` decimal(10,2) COMMENT '评价绩效指标扣减分数',
`complainScoreAdd` decimal(10,2) COMMENT '投诉绩效指标增加分数',
`complainScoreSub` decimal(10,2) COMMENT '投诉绩效指标扣减分数',
`workScoreAdd` decimal(10,2) COMMENT '办件绩效指标增加分数',
`workScoreSub` decimal(10,2) COMMENT '办件绩效指标扣减分数',
`effectScoreAdd` decimal(10,2) COMMENT '效能绩效指标增加分数',
`effectScoreSub` decimal(10,2) COMMENT '效能绩效指标扣减分数',
`otherScoreAdd` decimal(10,2) COMMENT '其它绩效指标增加分数',
`otherScoreSub` decimal(10,2) COMMENT '其它绩效指标扣减分数',
`remark` varchar(255) COMMENT '备注',
`year` int(9) NOT NULL COMMENT '年',
`month` tinyint(2) NOT NULL COMMENT '月',
`day` tinyint(2) NOT NULL COMMENT '日',
`createTime` datetime COMMENT '创建时间',
`createUserId` bigint(20) COMMENT '创建人id',
`updateTime` datetime COMMENT '更新时间',
`updateUserId` bigint(20) COMMENT '更新人id',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='员工绩效统计';
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