Commit 84bb548f authored by 廖旭伟's avatar 廖旭伟

Merge remote-tracking branch 'origin/master'

parents 05b68d67 165fa452
......@@ -29,11 +29,31 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="所属大厅:">
<p v-if="form.view == '查看'">{{ form.salaName }}</p>
<el-select
v-else
v-model="form.salaId"
style="width: 100%;"
disabled
>
<el-option
v-for="item in salaArr"
:key="item.id"
:label="item.deptName"
:value="item.id"
>
</el-option
></el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="所属部门:">
<p v-if="form.view == '查看'">{{ form.deptName }}</p>
<el-select
v-else
v-model="form.deptId"
......@@ -87,7 +107,7 @@
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="异常时间:">
<el-form-item label="异常时间:" prop="errorTime">
<p v-if="form.view == '查看'">{{ form.errorTime }}</p>
<el-date-picker
v-else
......@@ -103,7 +123,7 @@
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="实际打卡时间:">
<el-form-item label="实际打卡时间:" prop="actualAttendTime">
<p v-if="form.view == '查看'">{{ form.actualAttendTime }}</p>
<el-date-picker
......@@ -368,6 +388,16 @@ export default {
this.staffArr = [];
}
});
// 获取大厅列表
this.$get("/dept/getSalaList")
.then((res) => {
if (res.code == 1) {
this.salaArr = res.data.data;
}
})
.catch((error) => {
this.$message.error(error.message);
});
// 获取部门列表
this.$post("/dept/list", { page: 1, size: -1 }).then((res) => {
if (res.code == 1) {
......@@ -415,9 +445,12 @@ export default {
{ max: 64, message: "最多只能录入64个字符", trigger: "blur" },
],
createTime: [{ required: true, message: "请选择创建时间" }],
errorTime: [{ required: true, message: "请选择异常时间" }],
actualAttendTime: [{ required: true, message: "请选择实际打卡时间" }],
},
staffArr: [],
deptArr: [],
salaArr: [],
kaoqinArr: [],
fileList: [],
kaoqinCateArr: [],
......@@ -465,9 +498,9 @@ export default {
this.$forceUpdate(this.form);
},
staffChange(val) {
console.log(val);
let arr = this.staffArr.filter((v) => v.id == val);
this.form.deptId = arr && arr.length > 0 ? arr[0].deptId : "";
this.form.salaId = arr && arr.length > 0 ? arr[0].salaId : "";
},
/** 编辑 */
edit(row) {
......@@ -608,6 +641,8 @@ export default {
subAddType: "",
subMethod: "",
workNum: "",
salaId: null,
salaName: "",
};
this.resetForm("form");
},
......
......@@ -29,6 +29,27 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="所属大厅:">
<p v-if="form.view == '查看'">{{ form.salaName }}</p>
<el-select
v-else
v-model="form.salaId"
style="width: 100%;"
disabled
>
<el-option
v-for="item in salaArr"
:key="item.id"
:label="item.deptName"
:value="item.id"
>
</el-option
></el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="所属部门:">
......@@ -155,7 +176,7 @@
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="投诉时间:">
<el-form-item label="投诉时间:" prop="complainTime">
<p v-if="form.view == '查看'">{{ form.complainTime }}</p>
<el-date-picker
......@@ -415,6 +436,16 @@ export default {
this.staffArr = [];
}
});
// 获取大厅列表
this.$get("/dept/getSalaList")
.then((res) => {
if (res.code == 1) {
this.salaArr = res.data.data;
}
})
.catch((error) => {
this.$message.error(error.message);
});
// 获取部门列表
this.$post("/dept/list", { page: 1, size: -1 }).then((res) => {
if (res.code == 1) {
......@@ -455,11 +486,13 @@ export default {
{ max: 64, message: "最多只能录入64个字符", trigger: "blur" },
],
createTime: [{ required: true, message: "请选择创建时间" }],
complainTime: [{ required: true, message: "请选择投诉时间" }],
},
staffArr: [],
deptArr: [],
kaoqinArr: [],
fileList: [],
salaArr: [],
kaoqinCateArr: [],
ruleArr: [],
sourceArr: [
......@@ -531,6 +564,7 @@ export default {
staffChange(val) {
let arr = this.staffArr.filter((v) => v.id == val);
this.form.deptId = arr && arr.length > 0 ? arr[0].deptId : "";
this.form.salaId = arr && arr.length > 0 ? arr[0].salaId : "";
},
/** 编辑 */
edit(row) {
......@@ -609,6 +643,8 @@ export default {
remark: "",
filePaths: "",
fileNames: "",
salaId: null,
salaName: "",
};
this.open = true;
......@@ -693,6 +729,8 @@ export default {
score: "",
processStatus: 1,
remark: "",
salaId: null,
salaName: "",
};
this.resetForm("form");
},
......
......@@ -29,6 +29,27 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="所属大厅:">
<p v-if="form.view == '查看'">{{ form.salaName }}</p>
<el-select
v-else
v-model="form.salaId"
style="width: 100%;"
disabled
>
<el-option
v-for="item in salaArr"
:key="item.id"
:label="item.deptName"
:value="item.id"
>
</el-option
></el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="所属部门:">
......@@ -101,7 +122,7 @@
<el-row>
<el-col :span="22">
<el-form-item label="发生时间:">
<el-form-item label="发生时间:" prop="happenTime">
<p v-if="form.view == '查看'">{{ form.happenTime }}</p>
<el-date-picker
......@@ -131,7 +152,7 @@
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="报警时间:">
<el-form-item label="报警时间:" prop="alarmTime">
<p v-if="form.view == '查看'">{{ form.alarmTime }}</p>
<el-date-picker
......@@ -385,6 +406,16 @@ export default {
this.staffArr = [];
}
});
// 获取大厅列表
this.$get("/dept/getSalaList")
.then((res) => {
if (res.code == 1) {
this.salaArr = res.data.data;
}
})
.catch((error) => {
this.$message.error(error.message);
});
// 获取部门列表
this.$post("/dept/list", { page: 1, size: -1 }).then((res) => {
if (res.code == 1) {
......@@ -425,6 +456,8 @@ export default {
{ max: 64, message: "最多只能录入64个字符", trigger: "blur" },
],
createTime: [{ required: true, message: "请选择创建时间" }],
alarmTime: [{ required: true, message: "请选择创建时间" }],
happenTime: [{ required: true, message: "请选择创建时间" }],
},
staffArr: [
{
......@@ -436,6 +469,7 @@ export default {
deptArr: [],
kaoqinArr: [],
fileList: [],
salaArr: [],
kaoqinCateArr: [],
ruleArr: [],
sourceArr: [
......@@ -504,6 +538,7 @@ export default {
console.log(val);
let arr = this.staffArr.filter((v) => v.id == val);
this.form.deptId = arr && arr.length > 0 ? arr[0].deptId : "";
this.form.salaId = arr && arr.length > 0 ? arr[0].salaId : "";
},
/** 编辑 */
edit(row) {
......@@ -644,6 +679,8 @@ export default {
processStatus: 1,
remark: "",
categoryId: "",
salaId: null,
salaName: "",
};
this.resetForm("form");
},
......
......@@ -29,6 +29,27 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="所属大厅:">
<p v-if="form.view == '查看'">{{ form.salaName }}</p>
<el-select
v-else
v-model="form.salaId"
style="width: 100%;"
disabled
>
<el-option
v-for="item in salaArr"
:key="item.id"
:label="item.deptName"
:value="item.id"
>
</el-option
></el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="所属部门:">
......@@ -108,7 +129,7 @@
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="办件时间:">
<el-form-item label="办件时间:" prop="goworkTime">
<p v-if="form.view == '查看'">{{ form.goworkTime }}</p>
<el-date-picker
......@@ -355,6 +376,16 @@ export default {
this.staffArr = [];
}
});
// 获取大厅列表
this.$get("/dept/getSalaList")
.then((res) => {
if (res.code == 1) {
this.salaArr = res.data.data;
}
})
.catch((error) => {
this.$message.error(error.message);
});
// 获取部门列表
this.$post("/dept/list", { page: 1, size: -1 }).then((res) => {
if (res.code == 1) {
......@@ -395,6 +426,7 @@ export default {
{ max: 64, message: "最多只能录入64个字符", trigger: "blur" },
],
createTime: [{ required: true, message: "请选择创建时间" }],
goworkTime: [{ required: true, message: "请选择办件时间" }],
},
staffArr: [],
deptArr: [],
......@@ -402,6 +434,7 @@ export default {
fileList: [],
kaoqinCateArr: [],
ruleArr: [],
salaArr: [],
sourceArr: [
{
label: "窗口评价系统",
......@@ -469,9 +502,9 @@ export default {
this.$forceUpdate(this.form);
},
staffChange(val) {
console.log(val);
let arr = this.staffArr.filter((v) => v.id == val);
this.form.deptId = arr && arr.length > 0 ? arr[0].deptId : "";
this.form.salaId = arr && arr.length > 0 ? arr[0].salaId : "";
},
/** 编辑 */
edit(row) {
......@@ -606,6 +639,8 @@ export default {
score: "",
processStatus: 1,
remark: "",
salaId: null,
salaName: "",
};
this.resetForm("form");
},
......
......@@ -29,6 +29,27 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="所属大厅:">
<p v-if="form.view == '查看'">{{ form.salaName }}</p>
<el-select
v-else
v-model="form.salaId"
style="width: 100%;"
disabled
>
<el-option
v-for="item in salaArr"
:key="item.id"
:label="item.deptName"
:value="item.id"
>
</el-option
></el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="所属部门:">
......@@ -67,7 +88,7 @@
<el-row>
<el-col :span="22">
<el-form-item label="发生时间:">
<el-form-item label="发生时间:" prop="happenTime">
<p v-if="form.view == '查看'">{{ form.happenTime }}</p>
<el-date-picker
v-else
......@@ -315,6 +336,16 @@ export default {
this.staffArr = [];
}
});
// 获取大厅列表
this.$get("/dept/getSalaList")
.then((res) => {
if (res.code == 1) {
this.salaArr = res.data.data;
}
})
.catch((error) => {
this.$message.error(error.message);
});
// 获取部门列表
this.$post("/dept/list", { page: 1, size: -1 }).then((res) => {
if (res.code == 1) {
......@@ -355,6 +386,7 @@ export default {
{ max: 64, message: "最多只能录入64个字符", trigger: "blur" },
],
createTime: [{ required: true, message: "请选择创建时间" }],
happenTime: [{ required: true, message: "请选择发生时间" }],
},
staffArr: [],
deptArr: [],
......@@ -362,6 +394,7 @@ export default {
fileList: [],
kaoqinCateArr: [],
ruleArr: [],
salaArr: [],
sourceArr: [
{
label: "窗口评价系统",
......@@ -432,6 +465,7 @@ export default {
console.log(val);
let arr = this.staffArr.filter((v) => v.id == val);
this.form.deptId = arr && arr.length > 0 ? arr[0].deptId : "";
this.form.salaId = arr && arr.length > 0 ? arr[0].salaId : "";
},
/** 编辑 */
edit(row) {
......@@ -569,6 +603,8 @@ export default {
categoryId: "",
happenTime: "",
filePaths: "",
salaId: null,
salaName: "",
};
this.resetForm("form");
},
......
......@@ -29,6 +29,27 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="所属大厅:">
<p v-if="form.view == '查看'">{{ form.salaName }}</p>
<el-select
v-else
v-model="form.salaId"
style="width: 100%;"
disabled
>
<el-option
v-for="item in salaArr"
:key="item.id"
:label="item.deptName"
:value="item.id"
>
</el-option
></el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="所属部门:">
......@@ -120,7 +141,7 @@
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="评价时间">
<el-form-item label="评价时间" prop="reviewTime">
<p v-if="form.view == '查看'">{{ form.reviewTime }}</p>
<el-date-picker
......@@ -370,6 +391,16 @@ export default {
this.staffArr = [];
}
});
// 获取大厅列表
this.$get("/dept/getSalaList")
.then((res) => {
if (res.code == 1) {
this.salaArr = res.data.data;
}
})
.catch((error) => {
this.$message.error(error.message);
});
// 获取部门列表
this.$post("/dept/list", { page: 1, size: -1 }).then((res) => {
if (res.code == 1) {
......@@ -410,12 +441,14 @@ export default {
{ max: 64, message: "最多只能录入64个字符", trigger: "blur" },
],
createTime: [{ required: true, message: "请选择创建时间" }],
reviewTime: [{ required: true, message: "请选择评价时间" }],
},
staffArr: [],
deptArr: [],
kaoqinArr: [],
fileList: [],
kaoqinCateArr: [],
salaArr: [],
ruleArr: [],
sourceArr: [
{
......@@ -487,6 +520,7 @@ export default {
console.log(val);
let arr = this.staffArr.filter((v) => v.id == val);
this.form.deptId = arr && arr.length > 0 ? arr[0].deptId : "";
this.form.salaId = arr && arr.length > 0 ? arr[0].salaId : "";
},
/** 编辑 */
edit(row) {
......@@ -627,6 +661,8 @@ export default {
windowNum: "",
workNum: "",
categoryId: "",
salaId: null,
salaName: "",
};
this.resetForm("form");
},
......
......@@ -111,13 +111,30 @@ export default {
{ label: "姓名", prop: "staffName", formatter: this.formatter },
{ label: "工号", prop: "workNum", formatter: this.formatter },
{
label: "工号",
prop: "workNum",
formatter: this.formatter,
width: 80,
},
{ label: "手机号", prop: "phoneNumber", formatter: this.formatter },
{
label: "手机号",
prop: "phoneNumber",
formatter: this.formatter,
},
{ label: "所属大厅", prop: "salaName", formatter: this.formatter },
{
label: "所属大厅",
prop: "salaName",
formatter: this.formatter,
},
{ label: "所属部门", prop: "deptName", formatter: this.formatter },
{
label: "所属部门",
prop: "deptName",
formatter: this.formatter,
},
{
label: "所属中心",
formatter: (row) => {
......@@ -128,32 +145,129 @@ export default {
{
label: "考勤绩效指标分数",
prop: "attendScore",
width: 140,
formatter: (row) => {
console.log(row, this.tableData.dict, "1111");
return (
this.tableData.dict.weightPdu.attendWeight - row.attendScore
).toFixed(2) > 0 ? (
<span style="color:red">
{row.attendScore +
"(-" +
(
this.tableData.dict.weightPdu.attendWeight -
row.attendScore
).toFixed(2) +
""}
</span>
) : (
row.attendScore +
`(${(
this.tableData.dict.weightPdu.attendWeight - row.attendScore
).toFixed(2)})`
);
},
},
{
label: "评价绩效指标分数",
prop: "reviewScore",
width: 140,
formatter: (row) => {
return (
this.tableData.dict.weightPdu.reviewWeight - row.reviewScore
).toFixed(2) > 0 ? (
<span style="color:red">
{row.reviewScore +
"(-" +
(
this.tableData.dict.weightPdu.reviewWeight -
row.reviewScore
).toFixed(2) +
""}
</span>
) : (
row.reviewScore +
`(${(
this.tableData.dict.weightPdu.reviewWeight - row.reviewScore
).toFixed(2)})`
);
},
{
label: "投诉绩效指标分数",
prop: "complainScore",
},
// {
// label: "投诉绩效指标分数",
// prop: "complainScore",
// formatter: (row) => {
// return (
// row.complainScore +
// `(${this.tableData.dict.attendWeight - row.complainScore})`
// );
// },
// },
{
label: "办件绩效分数",
prop: "goworkScore",
width: 140,
formatter: (row) => {
return (
this.tableData.dict.weightPdu.goworkWeight - row.goworkScore
).toFixed(2) > 0 ? (
<span style="color:red">
{row.goworkScore +
"(-" +
(
this.tableData.dict.weightPdu.goworkWeight -
row.goworkScore
).toFixed(2) +
""}
</span>
) : (
row.goworkScore +
`(${(
this.tableData.dict.weightPdu.goworkWeight - row.goworkScore
).toFixed(2)})`
);
},
},
{
label: "效能绩效分数",
prop: "effectScore",
width: 140,
formatter: (row) => {
return (
this.tableData.dict.weightPdu.effectWeight - row.effectScore
).toFixed(2) > 0 ? (
<span style="color:red">
{row.effectScore +
"(-" +
(
this.tableData.dict.weightPdu.effectWeight -
row.effectScore
).toFixed(2) +
""}
</span>
) : (
row.effectScore +
`(${(
this.tableData.dict.weightPdu.effectWeight - row.effectScore
).toFixed(2)})`
);
},
{
label: "自评绩效分数",
prop: "otherScore",
},
// {
// label: "自评绩效分数",
// prop: "otherScore",
// formatter: (row) => {
// return (
// row.attendScore +
// `(${this.tableData.dict.selfWeight - row.attendScore})`
// );
// },
// },
// {
// label: "累计异常分数",
// prop: "errorScore",
......@@ -167,7 +281,7 @@ export default {
{ label: "", prop: "month", formatter: this.formatter },
{
label: "操作",
width: 240,
width: 120,
formatter: (row) => {
return (
<table-buttons
......
package com.mortals.xhx.daemon.task;
import cn.hutool.http.HttpUtil;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.ITask;
import com.mortals.framework.service.ITaskExcuteService;
import com.mortals.framework.utils.ServletUtils;
import com.mortals.xhx.base.system.upload.service.UploadService;
import com.mortals.xhx.module.door.model.DoorEntity;
import com.mortals.xhx.module.door.model.DoorQuery;
import com.mortals.xhx.module.door.service.DoorService;
import com.mortals.xhx.module.hik.face.model.req.img.ImgReq;
import com.mortals.xhx.module.hik.face.service.IHikFaceService;
import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.model.StaffQuery;
import com.mortals.xhx.module.staff.service.StaffService;
import lombok.extern.slf4j.Slf4j;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import org.springframework.web.multipart.MultipartFile;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.util.List;
import java.util.stream.Collectors;
......@@ -38,11 +38,25 @@ public class SyncRegisterUserPicTaskImpl implements ITaskExcuteService {
@Autowired
private StaffService staffService;
@Value("${hik.host:}")
protected String hikhost;
@Autowired
private DoorService doorService;
@Override
public void excuteTask(ITask task) throws AppException {
log.info("同步员工照片任务");
syncRegisterUsersPhotos();
if (!ObjectUtils.isEmpty(hikhost)) {
staffService.syncRegisterUsersPhotos();
} else {
List<DoorEntity> doorEntities = doorService.find(new DoorQuery());
for (DoorEntity doorEntity : doorEntities) {
//todo 直连设备
}
}
// syncRegisterUsersPhotos();
log.info("同步员工任务照片完成");
}
......@@ -53,7 +67,6 @@ public class SyncRegisterUserPicTaskImpl implements ITaskExcuteService {
.filter(item -> ObjectUtils.isEmpty(item.getPhotoPath()))
.filter(item -> !ObjectUtils.isEmpty(item.getPicUri())).collect(Collectors.toList());
for (StaffEntity staff : staffList) {
ImgReq imgReq = new ImgReq();
imgReq.setServerIndexCode(staff.getServerIndexCode());
......
......@@ -23,6 +23,7 @@ import com.mortals.xhx.module.staff.service.StaffLeaveService;
import com.mortals.xhx.module.staff.service.StaffService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
......@@ -47,10 +48,13 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
private IHikPersonService hikPersonService;
@Autowired
private IDingPersonService dingPersonService;
@Value("${hik.host:}")
protected String hikhost;
@Override
public void excuteTask(ITask task) throws AppException {
try {
if (!ObjectUtils.isEmpty(hikhost)) {
log.info("同步部门");
deptService.syncDept(null);
log.info("同步用户");
......@@ -94,6 +98,17 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
} catch (Exception e) {
log.error("同步钉钉usreId失败");
}
} else {
//todo 设备直连
deptService.syncDeptByDevice(null);
staffService.syncPersonsByDevices(null);
}
} catch (Exception e) {
log.error("同步人事异常", e);
}
......
......@@ -91,4 +91,12 @@ public interface DeptService extends ICRUDService<DeptEntity, Long> {
*/
Rest<String> syncDept(Context context);
/**
* 通过设备同步部门信息
* @param context
* @return
*/
Rest<String> syncDeptByDevice(Context context);
}
\ No newline at end of file
......@@ -341,4 +341,12 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity
return Rest.ok();
}
@Override
public Rest<String> syncDeptByDevice(Context context) {
//todo
return Rest.ok();
}
}
package com.mortals.xhx.module.door.model;
import java.util.List;
import java.util.ArrayList;
import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.door.model.vo.DoorVo;
import lombok.Data;
/**
* 门禁设备实体对象
*
* @author zxfei
* @date 2023-11-22
*/
* 门禁设备实体对象
*
* @author zxfei
* @date 2024-03-18
*/
@Data
public class DoorEntity extends DoorVo {
private static final long serialVersionUID = 1L;
......@@ -35,6 +43,18 @@ public class DoorEntity extends DoorVo {
* 密码
*/
private String password;
/**
* 所属部门id
*/
private String deptId;
/**
* 所属部门名称
*/
private String deptName;
/**
* 备注
*/
private String remark;
@Override
public int hashCode() {
return this.getId().hashCode();
......@@ -58,5 +78,8 @@ public class DoorEntity extends DoorVo {
this.port = 0;
this.username = "";
this.password = "";
this.deptId = "";
this.deptName = "";
this.remark = "";
}
}
\ No newline at end of file
package com.mortals.xhx.module.door.model;
import java.util.List;
import com.mortals.xhx.module.door.model.DoorEntity;
/**
* 门禁设备查询对象
*
* @author zxfei
* @date 2023-11-22
*/
* 门禁设备查询对象
*
* @author zxfei
* @date 2024-03-18
*/
public class DoorQuery extends DoorEntity {
/** 开始 序号,主键,自增长 */
private Long idStart;
......@@ -106,6 +106,21 @@ public class DoorQuery extends DoorEntity {
/** 结束 修改时间 */
private String updateTimeEnd;
/** 所属部门id */
private List<String> deptIdList;
/** 所属部门id排除列表 */
private List <String> deptIdNotList;
/** 所属部门名称 */
private List<String> deptNameList;
/** 所属部门名称排除列表 */
private List <String> deptNameNotList;
/** 备注 */
private List<String> remarkList;
/** 备注排除列表 */
private List <String> remarkNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<DoorQuery> orConditionList;
......@@ -662,6 +677,102 @@ public class DoorQuery extends DoorEntity {
this.updateTimeEnd = updateTimeEnd;
}
/**
* 获取 所属部门id
* @return deptIdList
*/
public List<String> getDeptIdList(){
return this.deptIdList;
}
/**
* 设置 所属部门id
* @param deptIdList
*/
public void setDeptIdList(List<String> deptIdList){
this.deptIdList = deptIdList;
}
/**
* 获取 所属部门id
* @return deptIdNotList
*/
public List<String> getDeptIdNotList(){
return this.deptIdNotList;
}
/**
* 设置 所属部门id
* @param deptIdNotList
*/
public void setDeptIdNotList(List<String> deptIdNotList){
this.deptIdNotList = deptIdNotList;
}
/**
* 获取 所属部门名称
* @return deptNameList
*/
public List<String> getDeptNameList(){
return this.deptNameList;
}
/**
* 设置 所属部门名称
* @param deptNameList
*/
public void setDeptNameList(List<String> deptNameList){
this.deptNameList = deptNameList;
}
/**
* 获取 所属部门名称
* @return deptNameNotList
*/
public List<String> getDeptNameNotList(){
return this.deptNameNotList;
}
/**
* 设置 所属部门名称
* @param deptNameNotList
*/
public void setDeptNameNotList(List<String> deptNameNotList){
this.deptNameNotList = deptNameNotList;
}
/**
* 获取 备注
* @return remarkList
*/
public List<String> getRemarkList(){
return this.remarkList;
}
/**
* 设置 备注
* @param remarkList
*/
public void setRemarkList(List<String> remarkList){
this.remarkList = remarkList;
}
/**
* 获取 备注
* @return remarkNotList
*/
public List<String> getRemarkNotList(){
return this.remarkNotList;
}
/**
* 设置 备注
* @param remarkNotList
*/
public void setRemarkNotList(List<String> remarkNotList){
this.remarkNotList = remarkNotList;
}
/**
* 设置 序号,主键,自增长
* @param id
......@@ -975,6 +1086,63 @@ public class DoorQuery extends DoorEntity {
}
/**
* 设置 所属部门id
* @param deptId
*/
public DoorQuery deptId(String deptId){
setDeptId(deptId);
return this;
}
/**
* 设置 所属部门id
* @param deptIdList
*/
public DoorQuery deptIdList(List<String> deptIdList){
this.deptIdList = deptIdList;
return this;
}
/**
* 设置 所属部门名称
* @param deptName
*/
public DoorQuery deptName(String deptName){
setDeptName(deptName);
return this;
}
/**
* 设置 所属部门名称
* @param deptNameList
*/
public DoorQuery deptNameList(List<String> deptNameList){
this.deptNameList = deptNameList;
return this;
}
/**
* 设置 备注
* @param remark
*/
public DoorQuery remark(String remark){
setRemark(remark);
return this;
}
/**
* 设置 备注
* @param remarkList
*/
public DoorQuery remarkList(List<String> remarkList){
this.remarkList = remarkList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
......
......@@ -51,11 +51,6 @@ public class DoorServiceImpl extends AbstractCRUDServiceImpl<DoorDao, DoorEntity
@Autowired
private IHikDoorService hikDoorService;
private Integer day;
@Autowired
private ICacheService cacheService;
@Override
public Rest<Void> syncDoorDeviceEvents(DoorEntity doorEntity, HikDoorEventReq hikDoorEventReq) {
......
......@@ -53,4 +53,10 @@ public interface StaffService extends ICRUDCacheService<StaffEntity,Long> {
*/
void doUpdateSala();
/**
* 通过海康云同步用户 照片
* @return
*/
Rest<Void> syncRegisterUsersPhotos();
}
\ No newline at end of file
......@@ -9,10 +9,12 @@ import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl;
import com.mortals.framework.util.SecurityUtil;
import com.mortals.framework.utils.ServletUtils;
import com.mortals.xhx.base.system.idgenerator.service.IdgeneratorService;
import com.mortals.xhx.base.system.idgenerator.service.impl.IdgeneratorServiceImpl;
import com.mortals.xhx.base.system.role.model.RoleUserQuery;
import com.mortals.xhx.base.system.role.service.RoleUserService;
import com.mortals.xhx.base.system.upload.service.UploadService;
import com.mortals.xhx.base.system.user.model.UserEntity;
import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.code.*;
......@@ -26,6 +28,8 @@ import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.door.model.DoorEntity;
import com.mortals.xhx.module.door.model.DoorQuery;
import com.mortals.xhx.module.door.service.DoorService;
import com.mortals.xhx.module.hik.face.model.req.img.ImgReq;
import com.mortals.xhx.module.hik.face.service.IHikFaceService;
import com.mortals.xhx.module.hik.person.model.req.person.PersonReq;
import com.mortals.xhx.module.hik.person.model.rsp.person.PersonDataInfo;
import com.mortals.xhx.module.hik.person.model.rsp.person.PersonInfo;
......@@ -51,7 +55,9 @@ import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import org.springframework.web.multipart.MultipartFile;
import java.io.InputStream;
import java.util.*;
import java.util.stream.Collectors;
......@@ -95,6 +101,11 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
@Autowired
private IHikStaffService hikStaffService;
@Autowired
private UploadService uploadService;
@Autowired
private IHikFaceService hikFaceService;
@Override
protected String getExtKey(StaffEntity data) {
//工号作为redis 扩展key
......@@ -178,13 +189,13 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
staffEntity.initAttrValue();
if (!ObjectUtils.isEmpty(deptEntity)) {
staffEntity.setDeptId(deptEntity.getId());
if(deptEntity.getParentId()==71l){
if (deptEntity.getParentId() == 71l) {
//市民中心id为71,代表是大厅
staffEntity.setSalaId(deptEntity.getId());
staffEntity.setSalaName(deptEntity.getDeptName());
}else {
} else {
DeptEntity salaEntity = deptService.get(deptEntity.getParentId());
if(!ObjectUtils.isEmpty(salaEntity)){
if (!ObjectUtils.isEmpty(salaEntity)) {
staffEntity.setSalaId(salaEntity.getId());
staffEntity.setSalaName(salaEntity.getDeptName());
}
......@@ -192,8 +203,8 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
}
staffEntity.setName(personInfo.getPersonName());
staffEntity.setRemarkId(personInfo.getPersonId());
staffEntity.setPicUri(personInfo.getPersonPhoto()==null?"":personInfo.getPersonPhoto().getPicUri());
staffEntity.setServerIndexCode(personInfo.getPersonPhoto()==null?"":personInfo.getPersonPhoto().getServerIndexCode());
staffEntity.setPicUri(personInfo.getPersonPhoto() == null ? "" : personInfo.getPersonPhoto().getPicUri());
staffEntity.setServerIndexCode(personInfo.getPersonPhoto() == null ? "" : personInfo.getPersonPhoto().getServerIndexCode());
staffEntity.setDeptName(personInfo.getOrgName());
staffEntity.setGender(personInfo.getGender());
staffEntity.setWorkNum(personInfo.getJobNo());
......@@ -205,13 +216,13 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
//更新
if (!ObjectUtils.isEmpty(deptEntity)) {
staffEntity.setDeptId(deptEntity.getId());
if(deptEntity.getParentId()==71l){
if (deptEntity.getParentId() == 71l) {
//市民中心id为71,代表是大厅
staffEntity.setSalaId(deptEntity.getId());
staffEntity.setSalaName(deptEntity.getDeptName());
}else {
} else {
DeptEntity salaEntity = deptService.get(deptEntity.getParentId());
if(!ObjectUtils.isEmpty(salaEntity)){
if (!ObjectUtils.isEmpty(salaEntity)) {
staffEntity.setSalaId(salaEntity.getId());
staffEntity.setSalaName(salaEntity.getDeptName());
}
......@@ -219,8 +230,8 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
}
staffEntity.setName(personInfo.getPersonName());
staffEntity.setRemarkId(personInfo.getPersonId());
staffEntity.setPicUri(personInfo.getPersonPhoto()==null?"":personInfo.getPersonPhoto().getPicUri());
staffEntity.setServerIndexCode(personInfo.getPersonPhoto()==null?"":personInfo.getPersonPhoto().getServerIndexCode());
staffEntity.setPicUri(personInfo.getPersonPhoto() == null ? "" : personInfo.getPersonPhoto().getPicUri());
staffEntity.setServerIndexCode(personInfo.getPersonPhoto() == null ? "" : personInfo.getPersonPhoto().getServerIndexCode());
staffEntity.setDeptName(personInfo.getOrgName());
staffEntity.setGender(personInfo.getGender());
staffEntity.setWorkNum(personInfo.getJobNo());
......@@ -279,7 +290,7 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
// if (!ObjectUtils.isEmpty(attendanceGroupStaffEntities)) {
// attendanceGroupStaffService.removeList(attendanceGroupStaffEntities,context);
// }
Long[] groudStaffIds = attendanceGroupStaffService.find(new AttendanceGroupStaffQuery().staffId(staff.getId())).stream().map(i->i.getId()).toArray(Long[]::new);
Long[] groudStaffIds = attendanceGroupStaffService.find(new AttendanceGroupStaffQuery().staffId(staff.getId())).stream().map(i -> i.getId()).toArray(Long[]::new);
if (!ObjectUtils.isEmpty(groudStaffIds)) {
attendanceGroupStaffService.remove(groudStaffIds, null);
}
......@@ -292,7 +303,6 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
}
@Override
protected void saveAfter(StaffEntity entity, Context context) throws AppException {
super.saveAfter(entity, context);
......@@ -379,7 +389,6 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
}
@Override
protected StaffEntity findBefore(StaffEntity params, PageInfo pageInfo, Context context) throws AppException {
if (params.getDeptId() != null) {
......@@ -394,77 +403,77 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
params.setDeptIdList(deptIdList);
}
}
if(params.getStatus()==null && CollectionUtils.isEmpty(params.getStatusList())){
if (params.getStatus() == null && CollectionUtils.isEmpty(params.getStatusList())) {
params.setStatusList(Arrays.asList(StaffSatusEnum.正式.getValue(), StaffSatusEnum.试用.getValue()));
}
return params;
}
@Override
public int checkAuthorize(StaffCheckAuthorizePdu pdu,Context context) throws AppException {
public int checkAuthorize(StaffCheckAuthorizePdu pdu, Context context) throws AppException {
StaffEntity temp = this.get(pdu.getStaffId());
if(temp == null){
if (temp == null) {
throw new AppException("人员信息ID不正确");
}
CheckTypeEnum checkTypeEnum = CheckTypeEnum.getByValue(pdu.getType());
if(checkTypeEnum==null){
if (checkTypeEnum == null) {
throw new AppException("考核类型不正确");
}
StaffEntity update = new StaffEntity();
update.setId(pdu.getStaffId());
//1.考勤绩效,2.评价绩效,3.办件绩效,4.效能绩效,5.其它绩效,6.投诉绩效
switch(checkTypeEnum){
switch (checkTypeEnum) {
case 考勤绩效:
if(temp.getAttendCheck()==1){
if (temp.getAttendCheck() == 1) {
update.setAttendCheck(0);
}else {
} else {
update.setAttendCheck(1);
}
break;
case 评价绩效:
if(temp.getComplainCheck()==1){
if (temp.getComplainCheck() == 1) {
update.setComplainCheck(0);
}else {
} else {
update.setComplainCheck(1);
}
break;
case 办件绩效:
if(temp.getGoworkCheck()==1){
if (temp.getGoworkCheck() == 1) {
update.setGoworkCheck(0);
}else {
} else {
update.setGoworkCheck(1);
}
break;
case 效能绩效:
if(temp.getEffectCheck()==1){
if (temp.getEffectCheck() == 1) {
update.setEffectCheck(0);
}else {
} else {
update.setEffectCheck(1);
}
break;
case 其它绩效:
if(temp.getOtherCheck()==1){
if (temp.getOtherCheck() == 1) {
update.setOtherCheck(0);
}else {
} else {
update.setOtherCheck(1);
}
break;
case 投诉绩效:
if(temp.getReviewCheck()==1){
if (temp.getReviewCheck() == 1) {
update.setReviewCheck(0);
}else {
} else {
update.setReviewCheck(1);
}
break;
default:
if(temp.getOtherCheck()==1){
if (temp.getOtherCheck() == 1) {
update.setOtherCheck(0);
}else {
} else {
update.setOtherCheck(1);
}
}
update.setUpdateTime(new Date());
if(context.getUser()!=null) {
if (context.getUser() != null) {
update.setUpdateUserId(context.getUser().getId());
}
return dao.update(update);
......@@ -473,15 +482,15 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
@Override
public void doUpdateSala() {
List<StaffEntity> staffList = this.getAllList();
for(StaffEntity staffEntity:staffList){
for (StaffEntity staffEntity : staffList) {
DeptEntity deptEntity = deptService.get(staffEntity.getDeptId());
if(deptEntity.getParentId()==71l){
if (deptEntity.getParentId() == 71l) {
//市民中心id为71,代表是大厅
staffEntity.setSalaId(deptEntity.getId());
staffEntity.setSalaName(deptEntity.getDeptName());
}else {
} else {
DeptEntity salaEntity = deptService.get(deptEntity.getParentId());
if(!ObjectUtils.isEmpty(salaEntity)){
if (!ObjectUtils.isEmpty(salaEntity)) {
staffEntity.setSalaId(salaEntity.getId());
staffEntity.setSalaName(salaEntity.getDeptName());
}
......@@ -491,6 +500,7 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
}
@Override
public Rest<Void> syncPersonsByDevices(Context context) {
log.info("同步人员!");
......@@ -603,11 +613,6 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
if (count == 0) {
staffLeaveService.save(staffLeaveEntity);
}
//考勤人员中有离职的 删除
// List<AttendanceGroupStaffEntity> attendanceGroupStaffEntities = attendanceGroupStaffService.find(new AttendanceGroupStaffQuery().staffId(staff.getId()));
// if (!ObjectUtils.isEmpty(attendanceGroupStaffEntities)) {
// attendanceGroupStaffService.removeList(attendanceGroupStaffEntities,context);
// }
Long[] groudStaffIds = attendanceGroupStaffService.find(new AttendanceGroupStaffQuery().staffId(staff.getId())).stream().map(m -> m.getId()).toArray(Long[]::new);
if (!ObjectUtils.isEmpty(groudStaffIds)) {
attendanceGroupStaffService.remove(groudStaffIds, null);
......@@ -616,16 +621,41 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
});
}
}
}
} else {
}
}
return Rest.ok();
}
@Override
public Rest<Void> syncRegisterUsersPhotos() {
List<StaffEntity> staffList = this.find(new StaffQuery().source(1)).stream()
.filter(item -> ObjectUtils.isEmpty(item.getPhotoPath()))
.filter(item -> !ObjectUtils.isEmpty(item.getPicUri())).collect(Collectors.toList());
for (StaffEntity staff : staffList) {
ImgReq imgReq = new ImgReq();
imgReq.setServerIndexCode(staff.getServerIndexCode());
imgReq.setPicUri(staff.getPicUri());
try {
InputStream inputStream = hikFaceService.callPostImgs(imgReq);
if (!ObjectUtils.isEmpty(inputStream)) {
MultipartFile file = ServletUtils.getMultipartFile(inputStream, "photo.jpg");
String filePath = uploadService.saveFileUpload(file, "file/fileupload/staff", null);
staff.setPhotoPath(filePath);
this.update(staff);
} else {
log.error("获取图片异常!");
}
} catch (Exception e) {
log.error("下载图片异常", e.getMessage());
}
}
return Rest.ok();
}
public static void main(String[] args) {
System.out.println("1" + StrUtil.padPre("125", 7, "0"));
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.door.dao.ibatis.DoorDaoImpl">
<!-- 字段和属性映射 -->
......@@ -16,6 +16,9 @@
<result property="createUserId" column="createUserId" />
<result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" />
<result property="deptId" column="deptId" />
<result property="deptName" column="deptName" />
<result property="remark" column="remark" />
</resultMap>
......@@ -56,23 +59,32 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptId') or colPickMode == 1 and data.containsKey('deptId')))">
a.deptId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptName') or colPickMode == 1 and data.containsKey('deptName')))">
a.deptName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('remark') or colPickMode == 1 and data.containsKey('remark')))">
a.remark,
</if>
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="DoorEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_door
(deviceName,deviceCode,ip,port,username,password,createTime,createUserId,updateUserId,updateTime)
(deviceName,deviceCode,ip,port,username,password,createTime,createUserId,updateUserId,updateTime,deptId,deptName,remark)
VALUES
(#{deviceName},#{deviceCode},#{ip},#{port},#{username},#{password},#{createTime},#{createUserId},#{updateUserId},#{updateTime})
(#{deviceName},#{deviceCode},#{ip},#{port},#{username},#{password},#{createTime},#{createUserId},#{updateUserId},#{updateTime},#{deptId},#{deptName},#{remark})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_door
(deviceName,deviceCode,ip,port,username,password,createTime,createUserId,updateUserId,updateTime)
(deviceName,deviceCode,ip,port,username,password,createTime,createUserId,updateUserId,updateTime,deptId,deptName,remark)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.deviceName},#{item.deviceCode},#{item.ip},#{item.port},#{item.username},#{item.password},#{item.createTime},#{item.createUserId},#{item.updateUserId},#{item.updateTime})
(#{item.deviceName},#{item.deviceCode},#{item.ip},#{item.port},#{item.username},#{item.password},#{item.createTime},#{item.createUserId},#{item.updateUserId},#{item.updateTime},#{item.deptId},#{item.deptName},#{item.remark})
</foreach>
</insert>
......@@ -121,6 +133,15 @@
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime},
</if>
<if test="(colPickMode==0 and data.containsKey('deptId')) or (colPickMode==1 and !data.containsKey('deptId'))">
a.deptId=#{data.deptId},
</if>
<if test="(colPickMode==0 and data.containsKey('deptName')) or (colPickMode==1 and !data.containsKey('deptName'))">
a.deptName=#{data.deptName},
</if>
<if test="(colPickMode==0 and data.containsKey('remark')) or (colPickMode==1 and !data.containsKey('remark'))">
a.remark=#{data.remark},
</if>
</trim>
<trim suffixOverrides="where" suffix="">
where
......@@ -218,6 +239,27 @@
</if>
</foreach>
</trim>
<trim prefix="deptId=(case" suffix="ELSE deptId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('deptId')) or (colPickMode==1 and !item.containsKey('deptId'))">
when a.id=#{item.id} then #{item.deptId}
</if>
</foreach>
</trim>
<trim prefix="deptName=(case" suffix="ELSE deptName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('deptName')) or (colPickMode==1 and !item.containsKey('deptName'))">
when a.id=#{item.id} then #{item.deptName}
</if>
</foreach>
</trim>
<trim prefix="remark=(case" suffix="ELSE remark end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('remark')) or (colPickMode==1 and !item.containsKey('remark'))">
when a.id=#{item.id} then #{item.remark}
</if>
</foreach>
</trim>
</trim>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
......@@ -577,6 +619,69 @@
<if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''">
${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('deptId')">
<if test="conditionParamRef.deptId != null and conditionParamRef.deptId != ''">
${_conditionType_} a.deptId like #{${_conditionParam_}.deptId}
</if>
<if test="conditionParamRef.deptId == null">
${_conditionType_} a.deptId is null
</if>
</if>
<if test="conditionParamRef.containsKey('deptIdList') and conditionParamRef.deptIdList.size() > 0">
${_conditionType_} a.deptId in
<foreach collection="conditionParamRef.deptIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('deptIdNotList') and conditionParamRef.deptIdNotList.size() > 0">
${_conditionType_} a.deptId not in
<foreach collection="conditionParamRef.deptIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('deptName')">
<if test="conditionParamRef.deptName != null and conditionParamRef.deptName != ''">
${_conditionType_} a.deptName like #{${_conditionParam_}.deptName}
</if>
<if test="conditionParamRef.deptName == null">
${_conditionType_} a.deptName is null
</if>
</if>
<if test="conditionParamRef.containsKey('deptNameList') and conditionParamRef.deptNameList.size() > 0">
${_conditionType_} a.deptName in
<foreach collection="conditionParamRef.deptNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('deptNameNotList') and conditionParamRef.deptNameNotList.size() > 0">
${_conditionType_} a.deptName not in
<foreach collection="conditionParamRef.deptNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('remark')">
<if test="conditionParamRef.remark != null and conditionParamRef.remark != ''">
${_conditionType_} a.remark like #{${_conditionParam_}.remark}
</if>
<if test="conditionParamRef.remark == null">
${_conditionType_} a.remark is null
</if>
</if>
<if test="conditionParamRef.containsKey('remarkList') and conditionParamRef.remarkList.size() > 0">
${_conditionType_} a.remark in
<foreach collection="conditionParamRef.remarkList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('remarkNotList') and conditionParamRef.remarkNotList.size() > 0">
${_conditionType_} a.remark not in
<foreach collection="conditionParamRef.remarkNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
......@@ -701,6 +806,21 @@
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('deptId')">
a.deptId
<if test='orderCol.deptId != null and "DESC".equalsIgnoreCase(orderCol.deptId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('deptName')">
a.deptName
<if test='orderCol.deptName != null and "DESC".equalsIgnoreCase(orderCol.deptName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('remark')">
a.remark
<if test='orderCol.remark != null and "DESC".equalsIgnoreCase(orderCol.remark)'>DESC</if>
,
</if>
</trim>
</if>
......
......@@ -1175,29 +1175,6 @@ ADD COLUMN `salaId` bigint(20) COMMENT '所属大厅' AFTER `deptName`,
ADD COLUMN `salaName` varchar(128) COMMENT '所属大厅名称' AFTER `salaId`;
-- ----------------------------
2024-02-29
-- ----------------------------
-- ----------------------------
-- 门禁设备表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_door`;
CREATE TABLE mortals_xhx_door(
`id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长',
`deviceName` varchar(64) COMMENT '设备名称',
`deviceCode` varchar(64) COMMENT '设备编码',
`ip` varchar(64) COMMENT 'Ip地址',
`port` int(9) COMMENT '端口',
`username` varchar(64) COMMENT '用户名',
`password` varchar(64) COMMENT '密码',
`createTime` datetime COMMENT '创建时间',
`createUserId` bigint(20) COMMENT '创建用户',
`updateUserId` bigint(20) COMMENT '更新用户',
`updateTime` datetime COMMENT '修改时间',
PRIMARY KEY (`id`)
,KEY `deviceCode` (`deviceCode`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='门禁设备';
-- ------------------
-- 2024-03-12
-- 绩效表增加人员大厅字段
......@@ -1271,3 +1248,30 @@ ALTER TABLE `mortals_xhx_staff_perform_stat`
ALTER TABLE `mortals_xhx_staff_perform_summary`
ADD COLUMN `salaId` bigint(20) DEFAULT NULL COMMENT '所属大厅' AFTER `deptName`,
ADD COLUMN `salaName` varchar(128) DEFAULT NULL COMMENT '所属大厅名称' AFTER `salaId`;
-- ----------------------------
2024-03-18
-- ----------------------------
-- ----------------------------
-- 门禁设备表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_door`;
CREATE TABLE mortals_xhx_door(
`id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长',
`deviceName` varchar(64) COMMENT '设备名称',
`deviceCode` varchar(64) COMMENT '设备编码',
`ip` varchar(64) COMMENT 'Ip地址',
`port` int(9) COMMENT '端口',
`username` varchar(64) COMMENT '用户名',
`password` varchar(64) COMMENT '密码',
`createTime` datetime COMMENT '创建时间',
`createUserId` bigint(20) COMMENT '创建用户',
`updateUserId` bigint(20) COMMENT '更新用户',
`updateTime` datetime COMMENT '修改时间',
`deptId` bigint (20) COMMENT '所属部门id',
`deptName` varchar(64) COMMENT '所属部门名称',
`remark` varchar(256) COMMENT '备注',
PRIMARY KEY (`id`)
,KEY `deviceCode` (`deviceCode`) USING BTREE
) 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