Commit 9868dd55 authored by 廖旭伟's avatar 廖旭伟

Merge remote-tracking branch 'origin/master'

parents 7c26068f 3b4ad7d9
...@@ -54,7 +54,6 @@ export default { ...@@ -54,7 +54,6 @@ export default {
el.validate((valid) => { el.validate((valid) => {
if (!valid) return; if (!valid) return;
this.loading = true; this.loading = true;
console.log("提交了");
this.$post( this.$post(
this.urls.saveUrl || this.pageInfo.saveUrl, this.urls.saveUrl || this.pageInfo.saveUrl,
this.beforeSubmit(this.form) this.beforeSubmit(this.form)
......
...@@ -56,7 +56,6 @@ export default { ...@@ -56,7 +56,6 @@ export default {
// //
res.entity = this.util_toDateStr(res.entity, this.toDate); res.entity = this.util_toDateStr(res.entity, this.toDate);
this.form = Object.assign({}, this.form, res.entity); this.form = Object.assign({}, this.form, res.entity);
this.dict = Object.assign({}, this.dict, res.dict); this.dict = Object.assign({}, this.dict, res.dict);
this.afterRender(res); this.afterRender(res);
}) })
...@@ -89,6 +88,9 @@ export default { ...@@ -89,6 +88,9 @@ export default {
el.validate((valid) => { el.validate((valid) => {
if (!valid) return; if (!valid) return;
this.loading = true; this.loading = true;
this.form.leaveType
? (this.form.leaveType = this.form.leaveType.toString())
: "";
this.$post(url, this.beforeSubmit(this.form)) this.$post(url, this.beforeSubmit(this.form))
.then((res) => { .then((res) => {
this.$message.success(res.msg); this.$message.success(res.msg);
......
...@@ -166,7 +166,8 @@ export default { ...@@ -166,7 +166,8 @@ export default {
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
direction: "rtl", direction: "rtl",
toString: ["leaveType", "deptId", "approverId", "auditResult"], toString: ["auditResult"],
// toString: ["leaveType", "deptId", "approverId", "auditResult"],
toDate: ["startTime", "endTime", "createTime"], toDate: ["startTime", "endTime", "createTime"],
// 表单校验 // 表单校验
rules: { rules: {
...@@ -256,11 +257,11 @@ export default { ...@@ -256,11 +257,11 @@ export default {
this.title = "新增请假记录信息"; this.title = "新增请假记录信息";
}, },
/** 查看*/ /** 查看*/
view(row) { async view(row) {
this.reset(); this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl = "attendance/leave/record/view"; this.urls.currUrl = "attendance/leave/record/view";
this.getData(); await this.getData();
this.pageInfo.type = "view"; this.pageInfo.type = "view";
this.title = "请假记录信息详细"; this.title = "请假记录信息详细";
}, },
......
...@@ -288,12 +288,12 @@ export default { ...@@ -288,12 +288,12 @@ export default {
{ label: "核查人员", prop: "checkPerson", formatter: this.formatter }, { label: "核查人员", prop: "checkPerson", formatter: this.formatter },
{ // {
label: "核查时间", // label: "核查时间",
prop: "checkTime", // prop: "checkTime",
width: 150, // width: 150,
formatter: this.formatterDate, // formatter: this.formatterDate,
}, // },
{ label: "分值", prop: "score", formatter: this.formatter }, { label: "分值", prop: "score", formatter: this.formatter },
......
...@@ -337,18 +337,22 @@ export default { ...@@ -337,18 +337,22 @@ export default {
this.query = { id: row.id }; this.query = { id: row.id };
await this.$get("/window/workman/perform/info", { await this.$get("/window/workman/perform/info", {
id: row.recordId, id: row.recordId,
}).then((res) => { })
console.log(res); .then((res) => {
if (res.code == 1) { console.log(res);
this.form = res.data; if (res.code == 1) {
this.form.id = row.id; this.form = res.data;
this.dict = res.dict; this.form.id = row.id;
} else { this.dict = res.dict;
this.form = row; } else {
} this.form = row;
this.form.view = "修改"; }
this.open = true; this.form.view = "修改";
}); this.open = true;
})
.catch((error) => {
this.$message.error(error.message);
});
this.pageInfo.type = "edit"; this.pageInfo.type = "edit";
this.title = "市政务服务大厅窗口工作人员考核汇总表"; this.title = "市政务服务大厅窗口工作人员考核汇总表";
// await this.$get("/check/window/workman/perform/info", { // await this.$get("/check/window/workman/perform/info", {
...@@ -437,25 +441,29 @@ export default { ...@@ -437,25 +441,29 @@ export default {
this.query = { id: row.id }; this.query = { id: row.id };
await this.$get("/window/workman/perform/info", { await this.$get("/window/workman/perform/info", {
id: row.recordId, id: row.recordId,
}).then((res) => { })
if (res.code == 1) { .then((res) => {
this.form = res.data; if (res.code == 1) {
this.form.id = row.id; this.form = res.data;
this.dict = res.dict; this.form.id = row.id;
} else { this.dict = res.dict;
this.form = row; } else {
} this.form = row;
this.form.view = "查看";
this.open = true;
this.$get("/check/window/workman/perform/info", { id: row.id }).then(
(response) => {
if (response.code == 1) {
this.form = { ...this.form, ...response.data };
this.dict = { ...this.dict, ...response.dict };
}
} }
); this.form.view = "查看";
}); this.open = true;
this.$get("/check/window/workman/perform/info", { id: row.id }).then(
(response) => {
if (response.code == 1) {
this.form = { ...this.form, ...response.data };
this.dict = { ...this.dict, ...response.dict };
}
}
);
})
.catch((error) => {
this.$message.error(error.message);
});
this.pageInfo.type = "view"; this.pageInfo.type = "view";
this.title = "市政务服务大厅窗口工作人员考核汇总表"; this.title = "市政务服务大厅窗口工作人员考核汇总表";
// this.form = row; // this.form = row;
......
...@@ -145,10 +145,10 @@ export default { ...@@ -145,10 +145,10 @@ export default {
prop: "otherScore", prop: "otherScore",
}, },
{ // {
label: "累计异常分数", // label: "累计异常分数",
prop: "errorScore", // prop: "errorScore",
}, // },
{ {
label: "本月得分数", label: "本月得分数",
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
:title="userPasswordDialog.title" :title="userPasswordDialog.title"
hei hei
:visible.sync="userPasswordDialog.open" :visible.sync="userPasswordDialog.open"
width="60%" width="40%"
> >
<el-form <el-form
ref="form" ref="form"
...@@ -91,8 +91,10 @@ ...@@ -91,8 +91,10 @@
v-model="userPasswordDialog.data.loginName" v-model="userPasswordDialog.data.loginName"
/> />
<Field <Field
label="登录密码" :span="20"
label="重置密码"
prop="loginPwd" prop="loginPwd"
v-model="userPasswordDialog.data.loginPwd" v-model="userPasswordDialog.data.loginPwd"
/> />
...@@ -108,9 +110,8 @@ ...@@ -108,9 +110,8 @@
<el-dialog <el-dialog
:title="userLoginDialog.title" :title="userLoginDialog.title"
hei
:visible.sync="userLoginDialog.open" :visible.sync="userLoginDialog.open"
width="60%" width="40%"
> >
<el-form <el-form
ref="form" ref="form"
...@@ -118,11 +119,19 @@ ...@@ -118,11 +119,19 @@
label-position="right" label-position="right"
> >
<el-row> <el-row>
<Field <Field
:span="20" :span="20"
label="登录名称" label="登录名称"
prop="loginName" prop="loginName"
v-model="userPasswordDialog.data.loginName" disabled
v-model="userLoginDialog.data.sourceloginName"
/>
<Field
:span="20"
label="修改登录名称"
prop="loginName"
v-model="userLoginDialog.data.loginName"
/> />
</el-row> </el-row>
</el-form> </el-form>
...@@ -235,29 +244,29 @@ export default { ...@@ -235,29 +244,29 @@ export default {
async distributeDept(row) { async distributeDept(row) {
console.log("分配部门"); console.log("分配部门");
try {
this.tableData.loading = true; this.tableData.loading = true;
this.userDeptDialog.data = row; this.userDeptDialog.data = row;
this.$nextTick(() => { this.$nextTick(() => {
this.$get("/dept/getListByParentId", { this.$get("/dept/getListByParentId", {
parentId: 0, parentId: 0,
}).then(({data}) => { }).then(({data}) => {
this.data = data.result; this.data = data.result;
this.node = {}; this.node = {};
console.log("data", this.data);
});
this.userDeptDialog.open = true;
}); });
} catch (error) { this.userDeptDialog.open = true;
}).catch(error => {
this.$message.error(error.message); this.$message.error(error.message);
} })
this.tableData.loading = false; this.tableData.loading = false;
}, },
updatePassword(row) { updatePassword(row) {
console.log("修改密码"); console.log("修改密码");
try { try {
this.userPasswordDialog.data = row; const dataCopy = Object.assign({}, row);
this.userPasswordDialog.data = dataCopy;
this.userPasswordDialog.data.loginPwd = ""; this.userPasswordDialog.data.loginPwd = "";
this.userPasswordDialog.open = true; this.userPasswordDialog.open = true;
} catch (error) { } catch (error) {
...@@ -267,55 +276,59 @@ export default { ...@@ -267,55 +276,59 @@ export default {
updatePasswordConfirm() { updatePasswordConfirm() {
console.log("修改密码"); console.log("修改密码");
try {
this.tableData.loading = true;
this.$post("/user/save", { this.$post("/user/save", {
"id": userPasswordDialog.data.id, "id": this.userPasswordDialog.data.id,
"loginPwd": userPasswordDialog.data.loginPwd, "loginPwd": this.userPasswordDialog.data.loginPwd,
}).then((res) => { }).then((res) => {
if (res && res.code == 1) { if (res && res.code == 1) {
this.userPasswordDialog.data = {}; this.userPasswordDialog.data = {};
this.$message.success("修改密码成功!"); this.$message.success("修改密码成功!");
} else { this.getData();
this.$message.error(res.message); this.userPasswordDialog.open = false;
} } else {
this.userRoleDialog.open = false; this.$message.error(res.msg);
}) }
} catch (error) { this.tableData.loading = false;
}).catch(error => {
this.$message.error(error.message); this.$message.error(error.message);
} })
}, },
updateLoginName(row) { updateLoginName(row) {
console.log("修改登录名"); console.log("修改登录名");
try { try {
this.userLoginDialog.data = row; const dataCopy = Object.assign({}, row);
this.userLoginDialog.data = dataCopy;
this.userLoginDialog.data.sourceloginName = dataCopy.loginName;
this.userLoginDialog.data.loginName = ""; this.userLoginDialog.data.loginName = "";
this.userLoginDialog.open = true; this.userLoginDialog.open = true;
} catch (error) { } catch (error) {
this.$message.error(error.message); this.$message.error(error.msg);
} }
}, },
updateLoginConfirm() { updateLoginConfirm() {
console.log("修改登录名"); console.log("修改登录名");
try { this.tableData.loading = true;
this.$post("/user/save", { this.$post("/login/reLoginName", {
"id": user.data.id, "id": this.userLoginDialog.data.id,
"loginName": userLoginDialog.data.loginName, "loginName": this.userLoginDialog.data.loginName,
}).then((res) => { "userType": this.userLoginDialog.data.userType
if (res && res.code == 1) { }).then((res) => {
this.userLoginDialog.data = {}; if (res && res.code == 1) {
this.$message.success("修改登录名成功!"); this.userLoginDialog.data = {};
} else { this.$message.success("修改登录名成功!");
this.$message.error(res.message); this.getData();
}
this.userLoginDialog.open = false; this.userLoginDialog.open = false;
}) } else {
} catch (error) { this.$message.error(res.msg);
}
this.tableData.loading = false;
}).catch(error => {
this.$message.error(error.message); this.$message.error(error.message);
} })
}, },
// 获取用户角色列表 // 获取用户角色列表
......
...@@ -337,16 +337,20 @@ export default { ...@@ -337,16 +337,20 @@ export default {
this.query = { id: row.id }; this.query = { id: row.id };
await this.$get("/window/workman/perform/info", { await this.$get("/window/workman/perform/info", {
id: row.recordId, id: row.recordId,
}).then((res) => { })
if (res.code == 1) { .then((res) => {
this.form = res.data; if (res.code == 1) {
this.dict = res.dict; this.form = res.data;
} else { this.dict = res.dict;
this.form = row; } else {
} this.form = row;
this.form.view = "修改"; }
this.open = true; this.form.view = "修改";
}); this.open = true;
})
.catch((error) => {
this.$message.error(error.message);
});
this.pageInfo.type = "edit"; this.pageInfo.type = "edit";
this.title = "市政务服务大厅窗口工作人员考核汇总表"; this.title = "市政务服务大厅窗口工作人员考核汇总表";
// await this.$get("/check/window/workman/perform/info", { // await this.$get("/check/window/workman/perform/info", {
...@@ -435,65 +439,79 @@ export default { ...@@ -435,65 +439,79 @@ export default {
this.query = { id: row.id }; this.query = { id: row.id };
await this.$get("/check/window/workman/perform/info", { await this.$get("/check/window/workman/perform/info", {
id: row.id, id: row.id,
}).then((res) => { })
if (res.code == 1) { .then((res) => {
this.form = res.data; if (res.code == 1) {
this.dict = res.dict; this.form = res.data;
} else { this.dict = res.dict;
this.form = row; } else {
} this.form = row;
for (let key in this.form) { }
key == "fillDate" for (let key in this.form) {
? (this.form[key] = timestampToTime(this.form[key], 6)) key == "fillDate"
: key == "createTime" ? (this.form[key] = timestampToTime(this.form[key], 6))
? (this.form[key] = timestampToTime(this.form[key], 6)) : key == "createTime"
: key == "deductTime" ? (this.form[key] = timestampToTime(this.form[key], 6))
? (this.form[key] = timestampToTime(this.form[key], 6)) : key == "deductTime"
: key == "updateTime" ? (this.form[key] = timestampToTime(this.form[key], 6))
? (this.form[key] = timestampToTime(this.form[key], 6)) : key == "updateTime"
: key == "checkTime" ? (this.form[key] = timestampToTime(this.form[key], 6))
? (this.form[key] = timestampToTime(this.form[key], 6)) : key == "checkTime"
: key == "reviewTime" ? (this.form[key] = timestampToTime(this.form[key], 6))
? (this.form[key] = timestampToTime(this.form[key], 6)) : key == "reviewTime"
: ""; ? (this.form[key] = timestampToTime(this.form[key], 6))
} : "";
this.$get("/window/workman/perform/detail/info", { id: row.id }).then( }
(response) => { this.$get("/window/workman/perform/detail/info", { id: row.id }).then(
if (response.code == 1) { (response) => {
this.form = { ...this.form, ...response.data }; if (response.code == 1) {
this.form = { ...this.form, ...response.data };
this.dict = { ...this.dict, ...response.dict }; this.dict = { ...this.dict, ...response.dict };
}
} }
} );
); this.$get("/window/workman/perform/info", { id: row.id }).then(
this.$get("/window/workman/perform/info", { id: row.id }).then( (responses) => {
(responses) => { if (responses.code == 1) {
if (responses.code == 1) { this.form = { ...this.form, ...responses.data };
this.form = { ...this.form, ...responses.data };
this.dict = { ...this.dict, ...responses.dict }; this.dict = { ...this.dict, ...responses.dict };
}
} }
} );
); this.tableData = [];
this.tableData = []; this.tableData.push({
this.tableData.push({ staffName: this.form["staffName"] ? this.form["staffName"] : "--",
staffName: this.form["staffName"] ? this.form["staffName"] : "--", discipline: this.form["discipline"]
discipline: this.form["discipline"] ? this.form["discipline"] : "--", ? this.form["discipline"]
specification: this.form["specification"] : "--",
? this.form["specification"] specification: this.form["specification"]
: "--", ? this.form["specification"]
management: this.form["management"] ? this.form["management"] : "--", : "--",
evaluation: this.form["evaluation"] ? this.form["evaluation"] : "--", management: this.form["management"]
efficiency: this.form["efficiency"] ? this.form["efficiency"] : "--", ? this.form["management"]
bonusScore: this.form["bonusScore"] ? this.form["bonusScore"] : "--", : "--",
sumScore: this.form["sumScore"] ? this.form["sumScore"] : "--", evaluation: this.form["evaluation"]
examineLevel: this.form["examineLevel"] ? this.form["evaluation"]
? this.dict["examineLevel"] : "--",
: "--", efficiency: this.form["efficiency"]
? this.form["efficiency"]
: "--",
bonusScore: this.form["bonusScore"]
? this.form["bonusScore"]
: "--",
sumScore: this.form["sumScore"] ? this.form["sumScore"] : "--",
examineLevel: this.form["examineLevel"]
? this.dict["examineLevel"]
: "--",
});
this.form.view = "查看";
this.open = true;
})
.catch((error) => {
this.$message.error(error.message);
}); });
this.form.view = "查看";
this.open = true;
});
this.pageInfo.type = "view"; this.pageInfo.type = "view";
this.title = "市政务服务大厅窗口工作人员考核汇总表"; this.title = "市政务服务大厅窗口工作人员考核汇总表";
}, },
......
...@@ -217,13 +217,11 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi ...@@ -217,13 +217,11 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
Long id = userEntity.getId(); Long id = userEntity.getId();
String loginName = userEntity.getLoginName(); String loginName = userEntity.getLoginName();
Integer userType = userEntity.getUserType(); Integer userType = userEntity.getUserType();
if (ObjectUtils.isEmpty(userEntity.getId())) { if (ObjectUtils.isEmpty(userEntity.getId())) {
throw new AppException("修改的用户id不能为空"); throw new AppException("修改的用户id不能为空");
} }
if (ObjectUtils.isEmpty(loginName)) { if (ObjectUtils.isEmpty(loginName)) {
throw new AppException("修改的登录名不能空!"); throw new AppException("修改的登录名不能空!");
} }
try { try {
......
package com.mortals.xhx.daemon.task; package com.mortals.xhx.daemon.task;
import cn.hutool.core.date.DateUtil;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.ICacheService; import com.mortals.framework.service.ICacheService;
import com.mortals.framework.service.ITask; import com.mortals.framework.service.ITask;
import com.mortals.framework.service.ITaskExcuteService; import com.mortals.framework.service.ITaskExcuteService;
import com.mortals.framework.util.DateUtils; import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.StringUtils; import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.module.attendance.model.AttendanceRecordErrorQuery;
import com.mortals.xhx.module.attendance.model.vo.AttendanceSummaryQuery; import com.mortals.xhx.module.attendance.model.vo.AttendanceSummaryQuery;
import com.mortals.xhx.module.attendance.service.AttendanceRecordErrorService; import com.mortals.xhx.module.attendance.service.AttendanceRecordErrorService;
import com.mortals.xhx.module.attendance.service.AttendanceStatService; import com.mortals.xhx.module.attendance.service.AttendanceStatService;
...@@ -23,13 +25,14 @@ import static com.mortals.xhx.common.key.RedisKey.KEY_ATTENDANCE_STAT_CACHE; ...@@ -23,13 +25,14 @@ import static com.mortals.xhx.common.key.RedisKey.KEY_ATTENDANCE_STAT_CACHE;
*/ */
@Slf4j @Slf4j
@Service("AttendanceSummaryTask") @Service("AttendanceSummaryTask")
public class AttendanceSummaryTaskImpl implements ITaskExcuteService { public class AttendanceSummaryTaskImpl implements ITaskExcuteService {
@Autowired @Autowired
private ICacheService cacheService; private ICacheService cacheService;
@Autowired @Autowired
private AttendanceRecordErrorService attendanceRecordErrorService; private AttendanceRecordErrorService attendanceRecordErrorService;
@Override @Override
public void excuteTask(ITask task) throws AppException { public void excuteTask(ITask task) throws AppException {
//考勤汇总前先自动处理前一天的异常考勤数据 //考勤汇总前先自动处理前一天的异常考勤数据
...@@ -42,9 +45,20 @@ public class AttendanceSummaryTaskImpl implements ITaskExcuteService { ...@@ -42,9 +45,20 @@ public class AttendanceSummaryTaskImpl implements ITaskExcuteService {
query.setSummaryTimeEnd(DateUtils.getStrDate(now.getTime())); query.setSummaryTimeEnd(DateUtils.getStrDate(now.getTime()));
//now.add(Calendar.DAY_OF_MONTH, -10); //now.add(Calendar.DAY_OF_MONTH, -10);
query.setSummaryTimeStart(DateUtils.getStrDate(now.getTime())); query.setSummaryTimeStart(DateUtils.getStrDate(now.getTime()));
log.info("考勤汇总时间:"+DateUtils.getDateTime(now.getTime(),"yyyy-MM-dd HH:mm:ss")); log.info("考勤汇总时间:" + DateUtils.getDateTime(now.getTime(), "yyyy-MM-dd HH:mm:ss"));
//重新汇总最近10天的考勤数据 //重新汇总最近10天的考勤数据
cacheService.lpush(KEY_ATTENDANCE_STAT_CACHE,query); cacheService.lpush(KEY_ATTENDANCE_STAT_CACHE, query);
//统计添加前一天考勤中绩效异常记录
log.info("统计添加前一天考勤中绩效异常记录开始");
AttendanceRecordErrorQuery errorQuery = new AttendanceRecordErrorQuery();
errorQuery.setErrorDateTimeStart(DateUtil.yesterday().toDateStr());
errorQuery.setErrorDateTimeEnd(DateUtil.yesterday().toDateStr());
attendanceRecordErrorService.doReprocess(errorQuery, null);
log.info("统计添加前一天考勤中绩效异常记录结束");
} }
@Override @Override
......
package com.mortals.xhx.daemon.task; package com.mortals.xhx.daemon.task;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.ITask; import com.mortals.framework.service.ITask;
import com.mortals.framework.service.ITaskExcuteService; import com.mortals.framework.service.ITaskExcuteService;
import com.mortals.xhx.common.code.*; import com.mortals.xhx.base.system.user.model.UserEntity;
import com.mortals.xhx.module.attendance.model.AttendanceStatEntity; import com.mortals.xhx.base.system.user.model.UserQuery;
import com.mortals.xhx.module.attendance.model.AttendanceVacationBalanceEntity; import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.module.attendance.service.AttendanceStatService; import com.mortals.xhx.module.attendance.service.AttendanceStatService;
import com.mortals.xhx.module.attendance.service.AttendanceVacationBalanceService; import com.mortals.xhx.module.attendance.service.AttendanceVacationBalanceService;
import com.mortals.xhx.module.dept.model.DeptEntity; import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.model.DeptQuery; import com.mortals.xhx.module.dept.model.DeptQuery;
import com.mortals.xhx.module.dept.service.DeptService; import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.dingding.personal.service.IDingPersonService;
import com.mortals.xhx.module.hik.person.model.req.org.OrgListReq; import com.mortals.xhx.module.hik.person.model.req.org.OrgListReq;
import com.mortals.xhx.module.hik.person.model.req.person.PersonReq;
import com.mortals.xhx.module.hik.person.model.rsp.org.OrgDataInfo; import com.mortals.xhx.module.hik.person.model.rsp.org.OrgDataInfo;
import com.mortals.xhx.module.hik.person.model.rsp.org.OrgInfo; import com.mortals.xhx.module.hik.person.model.rsp.org.OrgInfo;
import com.mortals.xhx.module.hik.person.model.rsp.person.PersonDataInfo;
import com.mortals.xhx.module.hik.person.model.rsp.person.PersonInfo;
import com.mortals.xhx.module.hik.person.service.IHikPersonService; import com.mortals.xhx.module.hik.person.service.IHikPersonService;
import com.mortals.xhx.module.staff.model.StaffEntity; import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.model.StaffLeaveEntity;
import com.mortals.xhx.module.staff.model.StaffQuery;
import com.mortals.xhx.module.staff.service.StaffLeaveService; import com.mortals.xhx.module.staff.service.StaffLeaveService;
import com.mortals.xhx.module.staff.service.StaffService; import com.mortals.xhx.module.staff.service.StaffService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -31,7 +26,8 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -31,7 +26,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import java.util.*; import java.util.Date;
import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -45,6 +41,8 @@ public class SyncUserTaskImpl implements ITaskExcuteService { ...@@ -45,6 +41,8 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
private StaffService staffService; private StaffService staffService;
@Autowired @Autowired
private DeptService deptService; private DeptService deptService;
@Autowired
private UserService userService;
@Autowired @Autowired
private AttendanceStatService attendanceStatService; private AttendanceStatService attendanceStatService;
...@@ -56,6 +54,8 @@ public class SyncUserTaskImpl implements ITaskExcuteService { ...@@ -56,6 +54,8 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
private IHikPersonService hikPersonService; private IHikPersonService hikPersonService;
@Autowired @Autowired
private StaffLeaveService staffLeaveService; private StaffLeaveService staffLeaveService;
@Autowired
private IDingPersonService dingPersonService;
@Override @Override
public void excuteTask(ITask task) throws AppException { public void excuteTask(ITask task) throws AppException {
...@@ -63,9 +63,45 @@ public class SyncUserTaskImpl implements ITaskExcuteService { ...@@ -63,9 +63,45 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
log.info("同步部门"); log.info("同步部门");
syncDepts(); syncDepts();
log.info("同步用户"); log.info("同步用户");
staffService.syncPersons(null); staffService.syncPersons(null);
log.info("同步钉钉usreId");
List<UserEntity> userList = userService.getCacheList().stream()
.filter(f -> !ObjectUtils.isEmpty(f.getCustomerId()))
.filter(f -> ObjectUtils.isEmpty(f.getDingUserId())).collect(Collectors.toList());
List<UserEntity> updateUserList = userList.stream().map(item -> {
UserEntity userEntity = new UserEntity();
userEntity.setId(item.getId());
String mobile = item.getMobile();
if (ObjectUtils.isEmpty(mobile)) {
//根据customerId查询staff 看是否有
StaffEntity staffCache = staffService.getCache(item.getCustomerId().toString());
if (!ObjectUtils.isEmpty(staffCache) && !ObjectUtils.isEmpty(staffCache.getPhoneNumber())) {
mobile = staffCache.getPhoneNumber();
userEntity.setMobile(mobile);
}
}
if (!ObjectUtils.isEmpty(mobile)) {
Rest<String> personByMobile = dingPersonService.getPersonByMobile(mobile);
if (!ObjectUtils.isEmpty(personByMobile) &&
YesNoEnum.YES.getValue() == personByMobile.getCode()
&& !ObjectUtils.isEmpty(personByMobile.getData())) {
userEntity.setDingUserId(personByMobile.getData());
}
}
userEntity.setUpdateTime(new Date());
userEntity.setUpdateUserId(1L);
return userEntity;
}).collect(Collectors.toList());
if(!ObjectUtils.isEmpty(updateUserList)){
log.info("更新用户钉钉id信息数量:{}",updateUserList.size());
userService.update(updateUserList);
}
} catch (Exception e) { } catch (Exception e) {
log.error("同步人事异常", e); log.error("同步人事异常", e);
} }
......
...@@ -221,7 +221,7 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At ...@@ -221,7 +221,7 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At
if (CollectionUtils.isNotEmpty(list)) { if (CollectionUtils.isNotEmpty(list)) {
log.info("重新生成["+day+"]已处理的绩效考勤核查数据....."); log.info("重新生成["+day+"]已处理的绩效考勤核查数据.....");
for (AttendanceRecordErrorEntity entity : list) { for (AttendanceRecordErrorEntity entity : list) {
if (YesNoEnum.YES.getValue() == entity.getProcessStatus()) { // if (YesNoEnum.YES.getValue() == entity.getProcessStatus()) {
//判断后打绩效 //判断后打绩效
String ruleCode = ""; String ruleCode = "";
if (ErrorStatusEnum.早退.getValue() == DataUtil.converStr2Int(entity.getProcessResult(), 3)) { if (ErrorStatusEnum.早退.getValue() == DataUtil.converStr2Int(entity.getProcessResult(), 3)) {
...@@ -287,7 +287,7 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At ...@@ -287,7 +287,7 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At
} }
} }
} // }
} }
log.info("从新生成已处理的绩效考勤核查数据,执行完成....."); log.info("从新生成已处理的绩效考勤核查数据,执行完成.....");
} }
......
...@@ -334,6 +334,7 @@ public class AttendanceRecordErrorController extends BaseCRUDJsonBodyMappingCont ...@@ -334,6 +334,7 @@ public class AttendanceRecordErrorController extends BaseCRUDJsonBodyMappingCont
* @return * @return
*/ */
@PostMapping({"doReprocess"}) @PostMapping({"doReprocess"})
@UnAuth
public Rest<String> doReprocess(@RequestBody AttendanceRecordErrorQuery query) { public Rest<String> doReprocess(@RequestBody AttendanceRecordErrorQuery query) {
Rest<String> ret = new Rest(); Rest<String> ret = new Rest();
Context context = this.getContext(); Context context = this.getContext();
......
...@@ -200,7 +200,7 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID ...@@ -200,7 +200,7 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
* 外出:PROC-56D3ADEE-45A4-47BC-931A-2A0DC067DE32 * 外出:PROC-56D3ADEE-45A4-47BC-931A-2A0DC067DE32
* 出差:PROC-578CBDDF-B768-496D-9918-44A3F1D9CAE7 * 出差:PROC-578CBDDF-B768-496D-9918-44A3F1D9CAE7
* @param startTime 审批实例开始时间,Unix时间戳,单位毫秒 * @param startTime 审批实例开始时间,Unix时间戳,单位毫秒
* @param endTime 审批实例结束时间,Unix时间戳,单位毫秒。 * @param endTime 审批实例结束时间,Unix时间戳,单位毫秒。 查询时间范围不能超过120天
* @param nextToken 分页游标。如果是非首次调用,该参数传上次调用时返回的nextToken。 * @param nextToken 分页游标。如果是非首次调用,该参数传上次调用时返回的nextToken。
* @param maxResults 分页参数,每页大小,最多传20。 * @param maxResults 分页参数,每页大小,最多传20。
* @param userIds 发起人id列表 最大列表长度为10 * @param userIds 发起人id列表 最大列表长度为10
......
...@@ -13,12 +13,14 @@ import com.mortals.xhx.module.check.model.CheckAttendRecordEntity; ...@@ -13,12 +13,14 @@ import com.mortals.xhx.module.check.model.CheckAttendRecordEntity;
import com.mortals.xhx.module.check.service.CheckAttendRecordService; import com.mortals.xhx.module.check.service.CheckAttendRecordService;
import com.mortals.xhx.module.dept.model.DeptEntity; import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.service.DeptService; import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.perform.model.PerformAttendRecordQuery;
import com.mortals.xhx.module.perform.model.PerformRulesCategoryEntity; import com.mortals.xhx.module.perform.model.PerformRulesCategoryEntity;
import com.mortals.xhx.module.perform.model.PerformRulesEntity; import com.mortals.xhx.module.perform.model.PerformRulesEntity;
import com.mortals.xhx.module.perform.service.PerformRulesCategoryService; import com.mortals.xhx.module.perform.service.PerformRulesCategoryService;
import com.mortals.xhx.module.perform.service.PerformRulesService; import com.mortals.xhx.module.perform.service.PerformRulesService;
import com.mortals.xhx.module.staff.model.StaffEntity; import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.service.StaffService; import com.mortals.xhx.module.staff.service.StaffService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -55,8 +57,6 @@ public class PerformAttendRecordServiceImpl extends AbstractCRUDServiceImpl<Perf ...@@ -55,8 +57,6 @@ public class PerformAttendRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
@Autowired @Autowired
private AttendanceGroupFixedworkService fixedworkService; private AttendanceGroupFixedworkService fixedworkService;
@Autowired @Autowired
private AttendanceClassService classService;
@Autowired
private AttendanceClassDetailService classDetailService; private AttendanceClassDetailService classDetailService;
@Autowired @Autowired
private PerformRulesCategoryService categoryService; private PerformRulesCategoryService categoryService;
...@@ -235,7 +235,20 @@ public class PerformAttendRecordServiceImpl extends AbstractCRUDServiceImpl<Perf ...@@ -235,7 +235,20 @@ public class PerformAttendRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
recordEntity.setWorkNum(staffEntity.getWorkNum()); recordEntity.setWorkNum(staffEntity.getWorkNum());
PerformRulesCategoryEntity categoryEntity = categoryService.get(rule.getCategoryId()); PerformRulesCategoryEntity categoryEntity = categoryService.get(rule.getCategoryId());
recordEntity.setCategoryName(categoryEntity == null ? "" : categoryEntity.getName()); recordEntity.setCategoryName(categoryEntity == null ? "" : categoryEntity.getName());
this.save(recordEntity);
//校验是否已经存在 不存在再添加新记录
PerformAttendRecordQuery query = new PerformAttendRecordQuery();
query.setStaffId(recordEntity.getStaffId());
query.setErrorTime(recordEntity.getErrorTime());
query.setRuleId(recordEntity.getRuleId());
PerformAttendRecordEntity performAttendRecordEntity = this.selectOne(query);
if(ObjectUtils.isEmpty(performAttendRecordEntity)){
this.save(recordEntity);
}else{
log.info("已经存在考勤记录,无需重复添加!");
}
// this.save(recordEntity);
} }
private PerformRulesEntity getRule(String ruleCode) { private PerformRulesEntity getRule(String ruleCode) {
......
...@@ -99,6 +99,17 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD ...@@ -99,6 +99,17 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD
} }
} }
} }
}else{
if (pdu.getSiteId() == null) {
pdu.setSiteId(1l); //默认只查宜宾市民中心
}
pdu.setSize(-1);
Rest<RespData<List<WindowPdu>>> respDataRest = windowFeign.list(pdu);
log.info(JSONObject.toJSONString(respDataRest));
if (respDataRest.getCode() == YesNoEnum.YES.getValue()) {
subList = respDataRest.getData().getData();
}
} }
ownerList.addAll(subList); ownerList.addAll(subList);
ownerList.addAll(subTwoList); ownerList.addAll(subTwoList);
......
...@@ -13,6 +13,18 @@ client.global.set("SmsSet_id", JSON.parse(response.body).data.id); ...@@ -13,6 +13,18 @@ client.global.set("SmsSet_id", JSON.parse(response.body).data.id);
client.global.set("authToken", JSON.parse(response.body).data.token); client.global.set("authToken", JSON.parse(response.body).data.token);
%} %}
###考勤打卡记录异常信息列表
POST {{baseUrl}}/attendance/record/error/doReprocess
Content-Type: application/json
{
"errorDateTimeStart":"2024-01-01",
"errorDateTimeEnd":"2024-01-30"
}
###考勤打卡记录异常信息列表 ###考勤打卡记录异常信息列表
POST {{baseUrl}}/attendance/record/error/list POST {{baseUrl}}/attendance/record/error/list
Authorization: {{authToken}} Authorization: {{authToken}}
......
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