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

Merge remote-tracking branch 'origin/master'

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