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,31 +145,128 @@ 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: "累计异常分数",
......@@ -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,53 +48,67 @@ 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 {
log.info("同步部门");
deptService.syncDept(null);
log.info("同步用户");
staffService.syncPersons(null);
log.info("同步钉钉usreId");
try {
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 = "";
StaffEntity staffCache = staffService.getCache(item.getCustomerId().toString());
if (!ObjectUtils.isEmpty(staffCache) && !ObjectUtils.isEmpty(staffCache.getPhoneNumber())) {
mobile = staffCache.getPhoneNumber();
if (ObjectUtils.isEmpty(item.getMobile())) {
userEntity.setMobile(mobile);
if (!ObjectUtils.isEmpty(hikhost)) {
log.info("同步部门");
deptService.syncDept(null);
log.info("同步用户");
staffService.syncPersons(null);
log.info("同步钉钉usreId");
try {
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 = "";
StaffEntity staffCache = staffService.getCache(item.getCustomerId().toString());
if (!ObjectUtils.isEmpty(staffCache) && !ObjectUtils.isEmpty(staffCache.getPhoneNumber())) {
mobile = staffCache.getPhoneNumber();
if (ObjectUtils.isEmpty(item.getMobile())) {
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());
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;
}).filter(f -> !ObjectUtils.isEmpty(f.getDingUserId())).collect(Collectors.toList());
userEntity.setUpdateTime(new Date());
userEntity.setUpdateUserId(1L);
return userEntity;
}).filter(f -> !ObjectUtils.isEmpty(f.getDingUserId())).collect(Collectors.toList());
if (!ObjectUtils.isEmpty(updateUserList)) {
log.info("更新用户钉钉id信息数量:{}", updateUserList.size());
userService.getUserDao().updateBatch(updateUserList);
if (!ObjectUtils.isEmpty(updateUserList)) {
log.info("更新用户钉钉id信息数量:{}", updateUserList.size());
userService.getUserDao().updateBatch(updateUserList);
}
} catch (Exception e) {
log.error("同步钉钉usreId失败");
}
} 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;
/**
* 设备名称
*/
* 设备名称
*/
private String deviceName;
/**
* 设备编码
*/
* 设备编码
*/
private String deviceCode;
/**
* Ip地址
*/
* Ip地址
*/
private String ip;
/**
* 端口
*/
* 端口
*/
private Integer port;
/**
* 用户名
*/
* 用户名
*/
private String username;
/**
* 密码
*/
* 密码
*/
private String password;
/**
* 所属部门id
*/
private String deptId;
/**
* 所属部门名称
*/
private String deptName;
/**
* 备注
*/
private String remark;
@Override
public int hashCode() {
return this.getId().hashCode();
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
......@@ -45,18 +65,21 @@ public class DoorEntity extends DoorVo {
if (obj instanceof DoorEntity) {
DoorEntity tmp = (DoorEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
return true;
}
}
return false;
}
public void initAttrValue(){
this.deviceName = "";
this.deviceCode = "";
this.ip = "";
this.port = 0;
this.username = "";
this.password = "";
this.deviceName = "";
this.deviceCode = "";
this.ip = "";
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;
......@@ -115,894 +130,1047 @@ public class DoorQuery extends DoorEntity {
public DoorQuery(){}
/**
* 获取 开始 序号,主键,自增长
* @return idStart
*/
* 获取 开始 序号,主键,自增长
* @return idStart
*/
public Long getIdStart(){
return this.idStart;
}
/**
* 设置 开始 序号,主键,自增长
* @param idStart
*/
* 设置 开始 序号,主键,自增长
* @param idStart
*/
public void setIdStart(Long idStart){
this.idStart = idStart;
}
/**
* 获取 结束 序号,主键,自增长
* @return $idEnd
*/
* 获取 结束 序号,主键,自增长
* @return $idEnd
*/
public Long getIdEnd(){
return this.idEnd;
}
/**
* 设置 结束 序号,主键,自增长
* @param idEnd
*/
* 设置 结束 序号,主键,自增长
* @param idEnd
*/
public void setIdEnd(Long idEnd){
this.idEnd = idEnd;
}
/**
* 获取 增加 序号,主键,自增长
* @return idIncrement
*/
* 获取 增加 序号,主键,自增长
* @return idIncrement
*/
public Long getIdIncrement(){
return this.idIncrement;
}
/**
* 设置 增加 序号,主键,自增长
* @param idIncrement
*/
* 设置 增加 序号,主键,自增长
* @param idIncrement
*/
public void setIdIncrement(Long idIncrement){
this.idIncrement = idIncrement;
}
/**
* 获取 序号,主键,自增长
* @return idList
*/
* 获取 序号,主键,自增长
* @return idList
*/
public List<Long> getIdList(){
return this.idList;
}
/**
* 设置 序号,主键,自增长
* @param idList
*/
* 设置 序号,主键,自增长
* @param idList
*/
public void setIdList(List<Long> idList){
this.idList = idList;
}
/**
* 获取 序号,主键,自增长
* @return idNotList
*/
* 获取 序号,主键,自增长
* @return idNotList
*/
public List<Long> getIdNotList(){
return this.idNotList;
}
/**
* 设置 序号,主键,自增长
* @param idNotList
*/
* 设置 序号,主键,自增长
* @param idNotList
*/
public void setIdNotList(List<Long> idNotList){
this.idNotList = idNotList;
}
/**
* 获取 设备名称
* @return deviceNameList
*/
* 获取 设备名称
* @return deviceNameList
*/
public List<String> getDeviceNameList(){
return this.deviceNameList;
}
/**
* 设置 设备名称
* @param deviceNameList
*/
* 设置 设备名称
* @param deviceNameList
*/
public void setDeviceNameList(List<String> deviceNameList){
this.deviceNameList = deviceNameList;
}
/**
* 获取 设备名称
* @return deviceNameNotList
*/
* 获取 设备名称
* @return deviceNameNotList
*/
public List<String> getDeviceNameNotList(){
return this.deviceNameNotList;
}
/**
* 设置 设备名称
* @param deviceNameNotList
*/
* 设置 设备名称
* @param deviceNameNotList
*/
public void setDeviceNameNotList(List<String> deviceNameNotList){
this.deviceNameNotList = deviceNameNotList;
}
/**
* 获取 设备编码
* @return deviceCodeList
*/
* 获取 设备编码
* @return deviceCodeList
*/
public List<String> getDeviceCodeList(){
return this.deviceCodeList;
}
/**
* 设置 设备编码
* @param deviceCodeList
*/
* 设置 设备编码
* @param deviceCodeList
*/
public void setDeviceCodeList(List<String> deviceCodeList){
this.deviceCodeList = deviceCodeList;
}
/**
* 获取 设备编码
* @return deviceCodeNotList
*/
* 获取 设备编码
* @return deviceCodeNotList
*/
public List<String> getDeviceCodeNotList(){
return this.deviceCodeNotList;
}
/**
* 设置 设备编码
* @param deviceCodeNotList
*/
* 设置 设备编码
* @param deviceCodeNotList
*/
public void setDeviceCodeNotList(List<String> deviceCodeNotList){
this.deviceCodeNotList = deviceCodeNotList;
}
/**
* 获取 Ip地址
* @return ipList
*/
* 获取 Ip地址
* @return ipList
*/
public List<String> getIpList(){
return this.ipList;
}
/**
* 设置 Ip地址
* @param ipList
*/
* 设置 Ip地址
* @param ipList
*/
public void setIpList(List<String> ipList){
this.ipList = ipList;
}
/**
* 获取 Ip地址
* @return ipNotList
*/
* 获取 Ip地址
* @return ipNotList
*/
public List<String> getIpNotList(){
return this.ipNotList;
}
/**
* 设置 Ip地址
* @param ipNotList
*/
* 设置 Ip地址
* @param ipNotList
*/
public void setIpNotList(List<String> ipNotList){
this.ipNotList = ipNotList;
}
/**
* 获取 开始 端口
* @return portStart
*/
* 获取 开始 端口
* @return portStart
*/
public Integer getPortStart(){
return this.portStart;
}
/**
* 设置 开始 端口
* @param portStart
*/
* 设置 开始 端口
* @param portStart
*/
public void setPortStart(Integer portStart){
this.portStart = portStart;
}
/**
* 获取 结束 端口
* @return $portEnd
*/
* 获取 结束 端口
* @return $portEnd
*/
public Integer getPortEnd(){
return this.portEnd;
}
/**
* 设置 结束 端口
* @param portEnd
*/
* 设置 结束 端口
* @param portEnd
*/
public void setPortEnd(Integer portEnd){
this.portEnd = portEnd;
}
/**
* 获取 增加 端口
* @return portIncrement
*/
* 获取 增加 端口
* @return portIncrement
*/
public Integer getPortIncrement(){
return this.portIncrement;
}
/**
* 设置 增加 端口
* @param portIncrement
*/
* 设置 增加 端口
* @param portIncrement
*/
public void setPortIncrement(Integer portIncrement){
this.portIncrement = portIncrement;
}
/**
* 获取 端口
* @return portList
*/
* 获取 端口
* @return portList
*/
public List<Integer> getPortList(){
return this.portList;
}
/**
* 设置 端口
* @param portList
*/
* 设置 端口
* @param portList
*/
public void setPortList(List<Integer> portList){
this.portList = portList;
}
/**
* 获取 端口
* @return portNotList
*/
* 获取 端口
* @return portNotList
*/
public List<Integer> getPortNotList(){
return this.portNotList;
}
/**
* 设置 端口
* @param portNotList
*/
* 设置 端口
* @param portNotList
*/
public void setPortNotList(List<Integer> portNotList){
this.portNotList = portNotList;
}
/**
* 获取 用户名
* @return usernameList
*/
* 获取 用户名
* @return usernameList
*/
public List<String> getUsernameList(){
return this.usernameList;
}
/**
* 设置 用户名
* @param usernameList
*/
* 设置 用户名
* @param usernameList
*/
public void setUsernameList(List<String> usernameList){
this.usernameList = usernameList;
}
/**
* 获取 用户名
* @return usernameNotList
*/
* 获取 用户名
* @return usernameNotList
*/
public List<String> getUsernameNotList(){
return this.usernameNotList;
}
/**
* 设置 用户名
* @param usernameNotList
*/
* 设置 用户名
* @param usernameNotList
*/
public void setUsernameNotList(List<String> usernameNotList){
this.usernameNotList = usernameNotList;
}
/**
* 获取 密码
* @return passwordList
*/
* 获取 密码
* @return passwordList
*/
public List<String> getPasswordList(){
return this.passwordList;
}
/**
* 设置 密码
* @param passwordList
*/
* 设置 密码
* @param passwordList
*/
public void setPasswordList(List<String> passwordList){
this.passwordList = passwordList;
}
/**
* 获取 密码
* @return passwordNotList
*/
* 获取 密码
* @return passwordNotList
*/
public List<String> getPasswordNotList(){
return this.passwordNotList;
}
/**
* 设置 密码
* @param passwordNotList
*/
* 设置 密码
* @param passwordNotList
*/
public void setPasswordNotList(List<String> passwordNotList){
this.passwordNotList = passwordNotList;
}
/**
* 获取 开始 创建时间
* @return createTimeStart
*/
* 获取 开始 创建时间
* @return createTimeStart
*/
public String getCreateTimeStart(){
return this.createTimeStart;
}
/**
* 设置 开始 创建时间
* @param createTimeStart
*/
* 设置 开始 创建时间
* @param createTimeStart
*/
public void setCreateTimeStart(String createTimeStart){
this.createTimeStart = createTimeStart;
}
/**
* 获取 结束 创建时间
* @return createTimeEnd
*/
* 获取 结束 创建时间
* @return createTimeEnd
*/
public String getCreateTimeEnd(){
return this.createTimeEnd;
}
/**
* 设置 结束 创建时间
* @param createTimeEnd
*/
* 设置 结束 创建时间
* @param createTimeEnd
*/
public void setCreateTimeEnd(String createTimeEnd){
this.createTimeEnd = createTimeEnd;
}
/**
* 获取 开始 创建用户
* @return createUserIdStart
*/
* 获取 开始 创建用户
* @return createUserIdStart
*/
public Long getCreateUserIdStart(){
return this.createUserIdStart;
}
/**
* 设置 开始 创建用户
* @param createUserIdStart
*/
* 设置 开始 创建用户
* @param createUserIdStart
*/
public void setCreateUserIdStart(Long createUserIdStart){
this.createUserIdStart = createUserIdStart;
}
/**
* 获取 结束 创建用户
* @return $createUserIdEnd
*/
* 获取 结束 创建用户
* @return $createUserIdEnd
*/
public Long getCreateUserIdEnd(){
return this.createUserIdEnd;
}
/**
* 设置 结束 创建用户
* @param createUserIdEnd
*/
* 设置 结束 创建用户
* @param createUserIdEnd
*/
public void setCreateUserIdEnd(Long createUserIdEnd){
this.createUserIdEnd = createUserIdEnd;
}
/**
* 获取 增加 创建用户
* @return createUserIdIncrement
*/
* 获取 增加 创建用户
* @return createUserIdIncrement
*/
public Long getCreateUserIdIncrement(){
return this.createUserIdIncrement;
}
/**
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
public void setCreateUserIdIncrement(Long createUserIdIncrement){
this.createUserIdIncrement = createUserIdIncrement;
}
/**
* 获取 创建用户
* @return createUserIdList
*/
* 获取 创建用户
* @return createUserIdList
*/
public List<Long> getCreateUserIdList(){
return this.createUserIdList;
}
/**
* 设置 创建用户
* @param createUserIdList
*/
* 设置 创建用户
* @param createUserIdList
*/
public void setCreateUserIdList(List<Long> createUserIdList){
this.createUserIdList = createUserIdList;
}
/**
* 获取 创建用户
* @return createUserIdNotList
*/
* 获取 创建用户
* @return createUserIdNotList
*/
public List<Long> getCreateUserIdNotList(){
return this.createUserIdNotList;
}
/**
* 设置 创建用户
* @param createUserIdNotList
*/
* 设置 创建用户
* @param createUserIdNotList
*/
public void setCreateUserIdNotList(List<Long> createUserIdNotList){
this.createUserIdNotList = createUserIdNotList;
}
/**
* 获取 开始 更新用户
* @return updateUserIdStart
*/
* 获取 开始 更新用户
* @return updateUserIdStart
*/
public Long getUpdateUserIdStart(){
return this.updateUserIdStart;
}
/**
* 设置 开始 更新用户
* @param updateUserIdStart
*/
* 设置 开始 更新用户
* @param updateUserIdStart
*/
public void setUpdateUserIdStart(Long updateUserIdStart){
this.updateUserIdStart = updateUserIdStart;
}
/**
* 获取 结束 更新用户
* @return $updateUserIdEnd
*/
* 获取 结束 更新用户
* @return $updateUserIdEnd
*/
public Long getUpdateUserIdEnd(){
return this.updateUserIdEnd;
}
/**
* 设置 结束 更新用户
* @param updateUserIdEnd
*/
* 设置 结束 更新用户
* @param updateUserIdEnd
*/
public void setUpdateUserIdEnd(Long updateUserIdEnd){
this.updateUserIdEnd = updateUserIdEnd;
}
/**
* 获取 增加 更新用户
* @return updateUserIdIncrement
*/
* 获取 增加 更新用户
* @return updateUserIdIncrement
*/
public Long getUpdateUserIdIncrement(){
return this.updateUserIdIncrement;
}
/**
* 设置 增加 更新用户
* @param updateUserIdIncrement
*/
* 设置 增加 更新用户
* @param updateUserIdIncrement
*/
public void setUpdateUserIdIncrement(Long updateUserIdIncrement){
this.updateUserIdIncrement = updateUserIdIncrement;
}
/**
* 获取 更新用户
* @return updateUserIdList
*/
* 获取 更新用户
* @return updateUserIdList
*/
public List<Long> getUpdateUserIdList(){
return this.updateUserIdList;
}
/**
* 设置 更新用户
* @param updateUserIdList
*/
* 设置 更新用户
* @param updateUserIdList
*/
public void setUpdateUserIdList(List<Long> updateUserIdList){
this.updateUserIdList = updateUserIdList;
}
/**
* 获取 更新用户
* @return updateUserIdNotList
*/
* 获取 更新用户
* @return updateUserIdNotList
*/
public List<Long> getUpdateUserIdNotList(){
return this.updateUserIdNotList;
}
/**
* 设置 更新用户
* @param updateUserIdNotList
*/
* 设置 更新用户
* @param updateUserIdNotList
*/
public void setUpdateUserIdNotList(List<Long> updateUserIdNotList){
this.updateUserIdNotList = updateUserIdNotList;
}
/**
* 获取 开始 修改时间
* @return updateTimeStart
*/
* 获取 开始 修改时间
* @return updateTimeStart
*/
public String getUpdateTimeStart(){
return this.updateTimeStart;
}
/**
* 设置 开始 修改时间
* @param updateTimeStart
*/
* 设置 开始 修改时间
* @param updateTimeStart
*/
public void setUpdateTimeStart(String updateTimeStart){
this.updateTimeStart = updateTimeStart;
}
/**
* 获取 结束 修改时间
* @return updateTimeEnd
*/
* 获取 结束 修改时间
* @return updateTimeEnd
*/
public String getUpdateTimeEnd(){
return this.updateTimeEnd;
}
/**
* 设置 结束 修改时间
* @param updateTimeEnd
*/
* 设置 结束 修改时间
* @param updateTimeEnd
*/
public void setUpdateTimeEnd(String updateTimeEnd){
this.updateTimeEnd = updateTimeEnd;
}
/**
* 设置 序号,主键,自增长
* @param id
*/
* 获取 所属部门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
*/
public DoorQuery id(Long id){
setId(id);
return this;
}
/**
* 设置 开始 序号,主键,自增长
* @param idStart
*/
setId(id);
return this;
}
/**
* 设置 开始 序号,主键,自增长
* @param idStart
*/
public DoorQuery idStart(Long idStart){
this.idStart = idStart;
return this;
this.idStart = idStart;
return this;
}
/**
* 设置 结束 序号,主键,自增长
* @param idEnd
*/
* 设置 结束 序号,主键,自增长
* @param idEnd
*/
public DoorQuery idEnd(Long idEnd){
this.idEnd = idEnd;
return this;
this.idEnd = idEnd;
return this;
}
/**
* 设置 增加 序号,主键,自增长
* @param idIncrement
*/
* 设置 增加 序号,主键,自增长
* @param idIncrement
*/
public DoorQuery idIncrement(Long idIncrement){
this.idIncrement = idIncrement;
return this;
this.idIncrement = idIncrement;
return this;
}
/**
* 设置 序号,主键,自增长
* @param idList
*/
* 设置 序号,主键,自增长
* @param idList
*/
public DoorQuery idList(List<Long> idList){
this.idList = idList;
return this;
}
/**
* 设置 序号,主键,自增长
* @param idNotList
*/
public DoorQuery idNotList(List<Long> idNotList){
return this;
}
/**
* 设置 序号,主键,自增长
* @param idNotList
*/
public DoorQuery idNotList(List<Long> idNotList){
this.idNotList = idNotList;
return this;
}
}
/**
* 设置 设备名称
* @param deviceName
*/
/**
* 设置 设备名称
* @param deviceName
*/
public DoorQuery deviceName(String deviceName){
setDeviceName(deviceName);
return this;
return this;
}
/**
* 设置 设备名称
* @param deviceNameList
*/
* 设置 设备名称
* @param deviceNameList
*/
public DoorQuery deviceNameList(List<String> deviceNameList){
this.deviceNameList = deviceNameList;
return this;
return this;
}
/**
* 设置 设备编码
* @param deviceCode
*/
/**
* 设置 设备编码
* @param deviceCode
*/
public DoorQuery deviceCode(String deviceCode){
setDeviceCode(deviceCode);
return this;
return this;
}
/**
* 设置 设备编码
* @param deviceCodeList
*/
* 设置 设备编码
* @param deviceCodeList
*/
public DoorQuery deviceCodeList(List<String> deviceCodeList){
this.deviceCodeList = deviceCodeList;
return this;
return this;
}
/**
* 设置 Ip地址
* @param ip
*/
/**
* 设置 Ip地址
* @param ip
*/
public DoorQuery ip(String ip){
setIp(ip);
return this;
return this;
}
/**
* 设置 Ip地址
* @param ipList
*/
* 设置 Ip地址
* @param ipList
*/
public DoorQuery ipList(List<String> ipList){
this.ipList = ipList;
return this;
return this;
}
/**
* 设置 端口
* @param port
*/
* 设置 端口
* @param port
*/
public DoorQuery port(Integer port){
setPort(port);
return this;
}
/**
* 设置 开始 端口
* @param portStart
*/
setPort(port);
return this;
}
/**
* 设置 开始 端口
* @param portStart
*/
public DoorQuery portStart(Integer portStart){
this.portStart = portStart;
return this;
this.portStart = portStart;
return this;
}
/**
* 设置 结束 端口
* @param portEnd
*/
* 设置 结束 端口
* @param portEnd
*/
public DoorQuery portEnd(Integer portEnd){
this.portEnd = portEnd;
return this;
this.portEnd = portEnd;
return this;
}
/**
* 设置 增加 端口
* @param portIncrement
*/
* 设置 增加 端口
* @param portIncrement
*/
public DoorQuery portIncrement(Integer portIncrement){
this.portIncrement = portIncrement;
return this;
this.portIncrement = portIncrement;
return this;
}
/**
* 设置 端口
* @param portList
*/
* 设置 端口
* @param portList
*/
public DoorQuery portList(List<Integer> portList){
this.portList = portList;
return this;
}
/**
* 设置 端口
* @param portNotList
*/
public DoorQuery portNotList(List<Integer> portNotList){
return this;
}
/**
* 设置 端口
* @param portNotList
*/
public DoorQuery portNotList(List<Integer> portNotList){
this.portNotList = portNotList;
return this;
}
}
/**
* 设置 用户名
* @param username
*/
/**
* 设置 用户名
* @param username
*/
public DoorQuery username(String username){
setUsername(username);
return this;
return this;
}
/**
* 设置 用户名
* @param usernameList
*/
* 设置 用户名
* @param usernameList
*/
public DoorQuery usernameList(List<String> usernameList){
this.usernameList = usernameList;
return this;
return this;
}
/**
* 设置 密码
* @param password
*/
/**
* 设置 密码
* @param password
*/
public DoorQuery password(String password){
setPassword(password);
return this;
return this;
}
/**
* 设置 密码
* @param passwordList
*/
* 设置 密码
* @param passwordList
*/
public DoorQuery passwordList(List<String> passwordList){
this.passwordList = passwordList;
return this;
return this;
}
/**
* 设置 创建用户
* @param createUserId
*/
* 设置 创建用户
* @param createUserId
*/
public DoorQuery createUserId(Long createUserId){
setCreateUserId(createUserId);
return this;
}
/**
* 设置 开始 创建用户
* @param createUserIdStart
*/
setCreateUserId(createUserId);
return this;
}
/**
* 设置 开始 创建用户
* @param createUserIdStart
*/
public DoorQuery createUserIdStart(Long createUserIdStart){
this.createUserIdStart = createUserIdStart;
return this;
this.createUserIdStart = createUserIdStart;
return this;
}
/**
* 设置 结束 创建用户
* @param createUserIdEnd
*/
* 设置 结束 创建用户
* @param createUserIdEnd
*/
public DoorQuery createUserIdEnd(Long createUserIdEnd){
this.createUserIdEnd = createUserIdEnd;
return this;
this.createUserIdEnd = createUserIdEnd;
return this;
}
/**
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
public DoorQuery createUserIdIncrement(Long createUserIdIncrement){
this.createUserIdIncrement = createUserIdIncrement;
return this;
this.createUserIdIncrement = createUserIdIncrement;
return this;
}
/**
* 设置 创建用户
* @param createUserIdList
*/
* 设置 创建用户
* @param createUserIdList
*/
public DoorQuery createUserIdList(List<Long> createUserIdList){
this.createUserIdList = createUserIdList;
return this;
}
/**
* 设置 创建用户
* @param createUserIdNotList
*/
public DoorQuery createUserIdNotList(List<Long> createUserIdNotList){
return this;
}
/**
* 设置 创建用户
* @param createUserIdNotList
*/
public DoorQuery createUserIdNotList(List<Long> createUserIdNotList){
this.createUserIdNotList = createUserIdNotList;
return this;
}
}
/**
* 设置 更新用户
* @param updateUserId
*/
* 设置 更新用户
* @param updateUserId
*/
public DoorQuery updateUserId(Long updateUserId){
setUpdateUserId(updateUserId);
return this;
}
/**
* 设置 开始 更新用户
* @param updateUserIdStart
*/
setUpdateUserId(updateUserId);
return this;
}
/**
* 设置 开始 更新用户
* @param updateUserIdStart
*/
public DoorQuery updateUserIdStart(Long updateUserIdStart){
this.updateUserIdStart = updateUserIdStart;
return this;
this.updateUserIdStart = updateUserIdStart;
return this;
}
/**
* 设置 结束 更新用户
* @param updateUserIdEnd
*/
* 设置 结束 更新用户
* @param updateUserIdEnd
*/
public DoorQuery updateUserIdEnd(Long updateUserIdEnd){
this.updateUserIdEnd = updateUserIdEnd;
return this;
this.updateUserIdEnd = updateUserIdEnd;
return this;
}
/**
* 设置 增加 更新用户
* @param updateUserIdIncrement
*/
* 设置 增加 更新用户
* @param updateUserIdIncrement
*/
public DoorQuery updateUserIdIncrement(Long updateUserIdIncrement){
this.updateUserIdIncrement = updateUserIdIncrement;
return this;
this.updateUserIdIncrement = updateUserIdIncrement;
return this;
}
/**
* 设置 更新用户
* @param updateUserIdList
*/
* 设置 更新用户
* @param updateUserIdList
*/
public DoorQuery updateUserIdList(List<Long> updateUserIdList){
this.updateUserIdList = updateUserIdList;
return this;
}
/**
* 设置 更新用户
* @param updateUserIdNotList
*/
public DoorQuery updateUserIdNotList(List<Long> updateUserIdNotList){
return this;
}
/**
* 设置 更新用户
* @param updateUserIdNotList
*/
public DoorQuery updateUserIdNotList(List<Long> updateUserIdNotList){
this.updateUserIdNotList = updateUserIdNotList;
return this;
}
}
/**
* 设置 所属部门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;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
*/
* 设置 所属部门名称
* @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
*/
public List<DoorQuery> getOrConditionList(){
return this.orConditionList;
return this.orConditionList;
}
/**
* 设置 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @param orConditionList
*/
* 设置 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @param orConditionList
*/
public void setOrConditionList(List<DoorQuery> orConditionList){
this.orConditionList = orConditionList;
}
/**
* 获取 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @return andConditionList
*/
* 获取 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @return andConditionList
*/
public List<DoorQuery> getAndConditionList(){
return this.andConditionList;
}
/**
* 设置 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @param andConditionList
*/
* 设置 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @param andConditionList
*/
public void setAndConditionList(List<DoorQuery> andConditionList){
this.andConditionList = andConditionList;
}
......
......@@ -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">
<!-- 字段和属性映射 -->
<resultMap type="DoorEntity" id="DoorEntity-Map">
<id property="id" column="id" />
<result property="deviceName" column="deviceName" />
<result property="deviceCode" column="deviceCode" />
<result property="ip" column="ip" />
<result property="port" column="port" />
<result property="username" column="username" />
<result property="password" column="password" />
<result property="createTime" column="createTime" />
<result property="createUserId" column="createUserId" />
<result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" />
<id property="id" column="id" />
<result property="deviceName" column="deviceName" />
<result property="deviceCode" column="deviceCode" />
<result property="ip" column="ip" />
<result property="port" column="port" />
<result property="username" column="username" />
<result property="password" column="password" />
<result property="createTime" column="createTime" />
<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>
<!-- 表所有列 -->
<sql id="_columns">
<trim suffixOverrides="," suffix="">
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
a.id,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deviceName') or colPickMode == 1 and data.containsKey('deviceName')))">
a.deviceName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deviceCode') or colPickMode == 1 and data.containsKey('deviceCode')))">
a.deviceCode,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('ip') or colPickMode == 1 and data.containsKey('ip')))">
a.ip,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('port') or colPickMode == 1 and data.containsKey('port')))">
a.port,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('username') or colPickMode == 1 and data.containsKey('username')))">
a.username,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('password') or colPickMode == 1 and data.containsKey('password')))">
a.password,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
a.createUserId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateUserId') or colPickMode == 1 and data.containsKey('updateUserId')))">
a.updateUserId,
</if>
<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('id') or colPickMode == 1 and data.containsKey('id')))">
a.id,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deviceName') or colPickMode == 1 and data.containsKey('deviceName')))">
a.deviceName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deviceCode') or colPickMode == 1 and data.containsKey('deviceCode')))">
a.deviceCode,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('ip') or colPickMode == 1 and data.containsKey('ip')))">
a.ip,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('port') or colPickMode == 1 and data.containsKey('port')))">
a.port,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('username') or colPickMode == 1 and data.containsKey('username')))">
a.username,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('password') or colPickMode == 1 and data.containsKey('password')))">
a.password,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
a.createUserId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateUserId') or colPickMode == 1 and data.containsKey('updateUserId')))">
a.updateUserId,
</if>
<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
......@@ -133,91 +154,112 @@
<update id="updateBatch" parameterType="paramDto">
update mortals_xhx_door as a
<trim prefix="set" suffixOverrides=",">
<trim prefix="deviceName=(case" suffix="ELSE deviceName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('deviceName')) or (colPickMode==1 and !item.containsKey('deviceName'))">
when a.id=#{item.id} then #{item.deviceName}
</if>
</foreach>
</trim>
<trim prefix="deviceCode=(case" suffix="ELSE deviceCode end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('deviceCode')) or (colPickMode==1 and !item.containsKey('deviceCode'))">
when a.id=#{item.id} then #{item.deviceCode}
</if>
</foreach>
</trim>
<trim prefix="ip=(case" suffix="ELSE ip end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('ip')) or (colPickMode==1 and !item.containsKey('ip'))">
when a.id=#{item.id} then #{item.ip}
</if>
</foreach>
</trim>
<trim prefix="port=(case" suffix="ELSE port end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('port')) or (colPickMode==1 and !item.containsKey('port'))">
when a.id=#{item.id} then #{item.port}
</when>
<when test="(colPickMode==0 and item.containsKey('portIncrement')) or (colPickMode==1 and !item.containsKey('portIncrement'))">
when a.id=#{item.id} then ifnull(a.port,0) + #{item.portIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="username=(case" suffix="ELSE username end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('username')) or (colPickMode==1 and !item.containsKey('username'))">
when a.id=#{item.id} then #{item.username}
</if>
</foreach>
</trim>
<trim prefix="password=(case" suffix="ELSE password end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('password')) or (colPickMode==1 and !item.containsKey('password'))">
when a.id=#{item.id} then #{item.password}
</if>
</foreach>
</trim>
<trim prefix="createTime=(case" suffix="ELSE createTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))">
when a.id=#{item.id} then #{item.createTime}
</if>
</foreach>
</trim>
<trim prefix="createUserId=(case" suffix="ELSE createUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('createUserId')) or (colPickMode==1 and !item.containsKey('createUserId'))">
when a.id=#{item.id} then #{item.createUserId}
</when>
<when test="(colPickMode==0 and item.containsKey('createUserIdIncrement')) or (colPickMode==1 and !item.containsKey('createUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.createUserId,0) + #{item.createUserIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="updateUserId=(case" suffix="ELSE updateUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('updateUserId')) or (colPickMode==1 and !item.containsKey('updateUserId'))">
when a.id=#{item.id} then #{item.updateUserId}
</when>
<when test="(colPickMode==0 and item.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !item.containsKey('updateUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.updateUserId,0) + #{item.updateUserIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="updateTime=(case" suffix="ELSE updateTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('updateTime')) or (colPickMode==1 and !item.containsKey('updateTime'))">
when a.id=#{item.id} then #{item.updateTime}
</if>
</foreach>
</trim>
<trim prefix="deviceName=(case" suffix="ELSE deviceName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('deviceName')) or (colPickMode==1 and !item.containsKey('deviceName'))">
when a.id=#{item.id} then #{item.deviceName}
</if>
</foreach>
</trim>
<trim prefix="deviceCode=(case" suffix="ELSE deviceCode end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('deviceCode')) or (colPickMode==1 and !item.containsKey('deviceCode'))">
when a.id=#{item.id} then #{item.deviceCode}
</if>
</foreach>
</trim>
<trim prefix="ip=(case" suffix="ELSE ip end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('ip')) or (colPickMode==1 and !item.containsKey('ip'))">
when a.id=#{item.id} then #{item.ip}
</if>
</foreach>
</trim>
<trim prefix="port=(case" suffix="ELSE port end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('port')) or (colPickMode==1 and !item.containsKey('port'))">
when a.id=#{item.id} then #{item.port}
</when>
<when test="(colPickMode==0 and item.containsKey('portIncrement')) or (colPickMode==1 and !item.containsKey('portIncrement'))">
when a.id=#{item.id} then ifnull(a.port,0) + #{item.portIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="username=(case" suffix="ELSE username end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('username')) or (colPickMode==1 and !item.containsKey('username'))">
when a.id=#{item.id} then #{item.username}
</if>
</foreach>
</trim>
<trim prefix="password=(case" suffix="ELSE password end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('password')) or (colPickMode==1 and !item.containsKey('password'))">
when a.id=#{item.id} then #{item.password}
</if>
</foreach>
</trim>
<trim prefix="createTime=(case" suffix="ELSE createTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))">
when a.id=#{item.id} then #{item.createTime}
</if>
</foreach>
</trim>
<trim prefix="createUserId=(case" suffix="ELSE createUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('createUserId')) or (colPickMode==1 and !item.containsKey('createUserId'))">
when a.id=#{item.id} then #{item.createUserId}
</when>
<when test="(colPickMode==0 and item.containsKey('createUserIdIncrement')) or (colPickMode==1 and !item.containsKey('createUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.createUserId,0) + #{item.createUserIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="updateUserId=(case" suffix="ELSE updateUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('updateUserId')) or (colPickMode==1 and !item.containsKey('updateUserId'))">
when a.id=#{item.id} then #{item.updateUserId}
</when>
<when test="(colPickMode==0 and item.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !item.containsKey('updateUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.updateUserId,0) + #{item.updateUserIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="updateTime=(case" suffix="ELSE updateTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('updateTime')) or (colPickMode==1 and !item.containsKey('updateTime'))">
when a.id=#{item.id} then #{item.updateTime}
</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=")">
......@@ -334,373 +376,451 @@
${_conditionType_} a.id=#{${_conditionParam_}.id}
</if>
</if>
<if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null ">
${_conditionType_} a.id = #{${_conditionParam_}.id}
</if>
<if test="conditionParamRef.id == null">
${_conditionType_} a.id is null
</if>
</if>
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
${_conditionType_} a.id in
<foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
<if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null ">
${_conditionType_} a.id = #{${_conditionParam_}.id}
</if>
<if test="conditionParamRef.containsKey('idNotList') and conditionParamRef.idNotList.size() > 0">
${_conditionType_} a.id not in
<foreach collection="conditionParamRef.idNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
<if test="conditionParamRef.id == null">
${_conditionType_} a.id is null
</if>
<if test="conditionParamRef.containsKey('idStart') and conditionParamRef.idStart != null">
${_conditionType_} a.id <![CDATA[ >= ]]> #{${_conditionParam_}.idStart}
</if>
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
${_conditionType_} a.id in
<foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('idNotList') and conditionParamRef.idNotList.size() > 0">
${_conditionType_} a.id not in
<foreach collection="conditionParamRef.idNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('idStart') and conditionParamRef.idStart != null">
${_conditionType_} a.id <![CDATA[ >= ]]> #{${_conditionParam_}.idStart}
</if>
<if test="conditionParamRef.containsKey('idEnd') and conditionParamRef.idEnd != null">
${_conditionType_} a.id <![CDATA[ <= ]]> #{${_conditionParam_}.idEnd}
</if>
<if test="conditionParamRef.containsKey('deviceName')">
<if test="conditionParamRef.deviceName != null and conditionParamRef.deviceName != ''">
${_conditionType_} a.deviceName like #{${_conditionParam_}.deviceName}
</if>
<if test="conditionParamRef.containsKey('idEnd') and conditionParamRef.idEnd != null">
${_conditionType_} a.id <![CDATA[ <= ]]> #{${_conditionParam_}.idEnd}
<if test="conditionParamRef.deviceName == null">
${_conditionType_} a.deviceName is null
</if>
</if>
<if test="conditionParamRef.containsKey('deviceNameList') and conditionParamRef.deviceNameList.size() > 0">
${_conditionType_} a.deviceName in
<foreach collection="conditionParamRef.deviceNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('deviceNameNotList') and conditionParamRef.deviceNameNotList.size() > 0">
${_conditionType_} a.deviceName not in
<foreach collection="conditionParamRef.deviceNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('deviceCode')">
<if test="conditionParamRef.deviceCode != null and conditionParamRef.deviceCode != ''">
${_conditionType_} a.deviceCode like #{${_conditionParam_}.deviceCode}
</if>
<if test="conditionParamRef.deviceCode == null">
${_conditionType_} a.deviceCode is null
</if>
</if>
<if test="conditionParamRef.containsKey('deviceCodeList') and conditionParamRef.deviceCodeList.size() > 0">
${_conditionType_} a.deviceCode in
<foreach collection="conditionParamRef.deviceCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('deviceCodeNotList') and conditionParamRef.deviceCodeNotList.size() > 0">
${_conditionType_} a.deviceCode not in
<foreach collection="conditionParamRef.deviceCodeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('deviceName')">
<if test="conditionParamRef.deviceName != null and conditionParamRef.deviceName != ''">
${_conditionType_} a.deviceName like #{${_conditionParam_}.deviceName}
</if>
<if test="conditionParamRef.deviceName == null">
${_conditionType_} a.deviceName is null
</if>
<if test="conditionParamRef.containsKey('ip')">
<if test="conditionParamRef.ip != null and conditionParamRef.ip != ''">
${_conditionType_} a.ip like #{${_conditionParam_}.ip}
</if>
<if test="conditionParamRef.containsKey('deviceNameList') and conditionParamRef.deviceNameList.size() > 0">
${_conditionType_} a.deviceName in
<foreach collection="conditionParamRef.deviceNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
<if test="conditionParamRef.ip == null">
${_conditionType_} a.ip is null
</if>
<if test="conditionParamRef.containsKey('deviceNameNotList') and conditionParamRef.deviceNameNotList.size() > 0">
${_conditionType_} a.deviceName not in
<foreach collection="conditionParamRef.deviceNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('ipList') and conditionParamRef.ipList.size() > 0">
${_conditionType_} a.ip in
<foreach collection="conditionParamRef.ipList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('ipNotList') and conditionParamRef.ipNotList.size() > 0">
${_conditionType_} a.ip not in
<foreach collection="conditionParamRef.ipNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('port')">
<if test="conditionParamRef.port != null ">
${_conditionType_} a.port = #{${_conditionParam_}.port}
</if>
<if test="conditionParamRef.containsKey('deviceCode')">
<if test="conditionParamRef.deviceCode != null and conditionParamRef.deviceCode != ''">
${_conditionType_} a.deviceCode like #{${_conditionParam_}.deviceCode}
</if>
<if test="conditionParamRef.deviceCode == null">
${_conditionType_} a.deviceCode is null
</if>
<if test="conditionParamRef.port == null">
${_conditionType_} a.port is null
</if>
<if test="conditionParamRef.containsKey('deviceCodeList') and conditionParamRef.deviceCodeList.size() > 0">
${_conditionType_} a.deviceCode in
<foreach collection="conditionParamRef.deviceCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('portList') and conditionParamRef.portList.size() > 0">
${_conditionType_} a.port in
<foreach collection="conditionParamRef.portList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('portNotList') and conditionParamRef.portNotList.size() > 0">
${_conditionType_} a.port not in
<foreach collection="conditionParamRef.portNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('portStart') and conditionParamRef.portStart != null">
${_conditionType_} a.port <![CDATA[ >= ]]> #{${_conditionParam_}.portStart}
</if>
<if test="conditionParamRef.containsKey('portEnd') and conditionParamRef.portEnd != null">
${_conditionType_} a.port <![CDATA[ <= ]]> #{${_conditionParam_}.portEnd}
</if>
<if test="conditionParamRef.containsKey('username')">
<if test="conditionParamRef.username != null and conditionParamRef.username != ''">
${_conditionType_} a.username like #{${_conditionParam_}.username}
</if>
<if test="conditionParamRef.containsKey('deviceCodeNotList') and conditionParamRef.deviceCodeNotList.size() > 0">
${_conditionType_} a.deviceCode not in
<foreach collection="conditionParamRef.deviceCodeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
<if test="conditionParamRef.username == null">
${_conditionType_} a.username is null
</if>
</if>
<if test="conditionParamRef.containsKey('usernameList') and conditionParamRef.usernameList.size() > 0">
${_conditionType_} a.username in
<foreach collection="conditionParamRef.usernameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('usernameNotList') and conditionParamRef.usernameNotList.size() > 0">
${_conditionType_} a.username not in
<foreach collection="conditionParamRef.usernameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('ip')">
<if test="conditionParamRef.ip != null and conditionParamRef.ip != ''">
${_conditionType_} a.ip like #{${_conditionParam_}.ip}
</if>
<if test="conditionParamRef.ip == null">
${_conditionType_} a.ip is null
</if>
<if test="conditionParamRef.containsKey('password')">
<if test="conditionParamRef.password != null and conditionParamRef.password != ''">
${_conditionType_} a.password like #{${_conditionParam_}.password}
</if>
<if test="conditionParamRef.containsKey('ipList') and conditionParamRef.ipList.size() > 0">
${_conditionType_} a.ip in
<foreach collection="conditionParamRef.ipList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
<if test="conditionParamRef.password == null">
${_conditionType_} a.password is null
</if>
<if test="conditionParamRef.containsKey('ipNotList') and conditionParamRef.ipNotList.size() > 0">
${_conditionType_} a.ip not in
<foreach collection="conditionParamRef.ipNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('passwordList') and conditionParamRef.passwordList.size() > 0">
${_conditionType_} a.password in
<foreach collection="conditionParamRef.passwordList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('passwordNotList') and conditionParamRef.passwordNotList.size() > 0">
${_conditionType_} a.password not in
<foreach collection="conditionParamRef.passwordNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createTime')">
<if test="conditionParamRef.createTime != null ">
${_conditionType_} a.createTime = #{${_conditionParam_}.createTime}
</if>
<if test="conditionParamRef.containsKey('port')">
<if test="conditionParamRef.port != null ">
${_conditionType_} a.port = #{${_conditionParam_}.port}
</if>
<if test="conditionParamRef.port == null">
${_conditionType_} a.port is null
</if>
<if test="conditionParamRef.createTime == null">
${_conditionType_} a.createTime is null
</if>
<if test="conditionParamRef.containsKey('portList') and conditionParamRef.portList.size() > 0">
${_conditionType_} a.port in
<foreach collection="conditionParamRef.portList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createTimeStart') and conditionParamRef.createTimeStart != null and conditionParamRef.createTimeStart!=''">
${_conditionType_} a.createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('createTimeEnd') and conditionParamRef.createTimeEnd != null and conditionParamRef.createTimeEnd!=''">
${_conditionType_} a.createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('createUserId')">
<if test="conditionParamRef.createUserId != null ">
${_conditionType_} a.createUserId = #{${_conditionParam_}.createUserId}
</if>
<if test="conditionParamRef.containsKey('portNotList') and conditionParamRef.portNotList.size() > 0">
${_conditionType_} a.port not in
<foreach collection="conditionParamRef.portNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
<if test="conditionParamRef.createUserId == null">
${_conditionType_} a.createUserId is null
</if>
<if test="conditionParamRef.containsKey('portStart') and conditionParamRef.portStart != null">
${_conditionType_} a.port <![CDATA[ >= ]]> #{${_conditionParam_}.portStart}
</if>
<if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
${_conditionType_} a.createUserId in
<foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserIdNotList') and conditionParamRef.createUserIdNotList.size() > 0">
${_conditionType_} a.createUserId not in
<foreach collection="conditionParamRef.createUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserIdStart') and conditionParamRef.createUserIdStart != null">
${_conditionType_} a.createUserId <![CDATA[ >= ]]> #{${_conditionParam_}.createUserIdStart}
</if>
<if test="conditionParamRef.containsKey('createUserIdEnd') and conditionParamRef.createUserIdEnd != null">
${_conditionType_} a.createUserId <![CDATA[ <= ]]> #{${_conditionParam_}.createUserIdEnd}
</if>
<if test="conditionParamRef.containsKey('updateUserId')">
<if test="conditionParamRef.updateUserId != null ">
${_conditionType_} a.updateUserId = #{${_conditionParam_}.updateUserId}
</if>
<if test="conditionParamRef.containsKey('portEnd') and conditionParamRef.portEnd != null">
${_conditionType_} a.port <![CDATA[ <= ]]> #{${_conditionParam_}.portEnd}
<if test="conditionParamRef.updateUserId == null">
${_conditionType_} a.updateUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
${_conditionType_} a.updateUserId in
<foreach collection="conditionParamRef.updateUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('updateUserIdNotList') and conditionParamRef.updateUserIdNotList.size() > 0">
${_conditionType_} a.updateUserId not in
<foreach collection="conditionParamRef.updateUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('updateUserIdStart') and conditionParamRef.updateUserIdStart != null">
${_conditionType_} a.updateUserId <![CDATA[ >= ]]> #{${_conditionParam_}.updateUserIdStart}
</if>
<if test="conditionParamRef.containsKey('updateUserIdEnd') and conditionParamRef.updateUserIdEnd != null">
${_conditionType_} a.updateUserId <![CDATA[ <= ]]> #{${_conditionParam_}.updateUserIdEnd}
</if>
<if test="conditionParamRef.containsKey('username')">
<if test="conditionParamRef.username != null and conditionParamRef.username != ''">
${_conditionType_} a.username like #{${_conditionParam_}.username}
</if>
<if test="conditionParamRef.username == null">
${_conditionType_} a.username is null
</if>
<if test="conditionParamRef.containsKey('updateTime')">
<if test="conditionParamRef.updateTime != null ">
${_conditionType_} a.updateTime = #{${_conditionParam_}.updateTime}
</if>
<if test="conditionParamRef.containsKey('usernameList') and conditionParamRef.usernameList.size() > 0">
${_conditionType_} a.username in
<foreach collection="conditionParamRef.usernameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('usernameNotList') and conditionParamRef.usernameNotList.size() > 0">
${_conditionType_} a.username not in
<foreach collection="conditionParamRef.usernameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
<if test="conditionParamRef.updateTime == null">
${_conditionType_} a.updateTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('updateTimeStart') and conditionParamRef.updateTimeStart != null and conditionParamRef.updateTimeStart!=''">
${_conditionType_} a.updateTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<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('password')">
<if test="conditionParamRef.password != null and conditionParamRef.password != ''">
${_conditionType_} a.password like #{${_conditionParam_}.password}
</if>
<if test="conditionParamRef.password == null">
${_conditionType_} a.password is null
</if>
<if test="conditionParamRef.containsKey('deptId')">
<if test="conditionParamRef.deptId != null and conditionParamRef.deptId != ''">
${_conditionType_} a.deptId like #{${_conditionParam_}.deptId}
</if>
<if test="conditionParamRef.containsKey('passwordList') and conditionParamRef.passwordList.size() > 0">
${_conditionType_} a.password in
<foreach collection="conditionParamRef.passwordList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('passwordNotList') and conditionParamRef.passwordNotList.size() > 0">
${_conditionType_} a.password not in
<foreach collection="conditionParamRef.passwordNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
<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('createTime')">
<if test="conditionParamRef.createTime != null ">
${_conditionType_} a.createTime = #{${_conditionParam_}.createTime}
</if>
<if test="conditionParamRef.createTime == null">
${_conditionType_} a.createTime is null
</if>
<if test="conditionParamRef.containsKey('deptName')">
<if test="conditionParamRef.deptName != null and conditionParamRef.deptName != ''">
${_conditionType_} a.deptName like #{${_conditionParam_}.deptName}
</if>
<if test="conditionParamRef.containsKey('createTimeStart') and conditionParamRef.createTimeStart != null and conditionParamRef.createTimeStart!=''">
${_conditionType_} a.createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
<if test="conditionParamRef.deptName == null">
${_conditionType_} a.deptName is null
</if>
<if test="conditionParamRef.containsKey('createTimeEnd') and conditionParamRef.createTimeEnd != null and conditionParamRef.createTimeEnd!=''">
${_conditionType_} a.createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</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.containsKey('createUserId')">
<if test="conditionParamRef.createUserId != null ">
${_conditionType_} a.createUserId = #{${_conditionParam_}.createUserId}
</if>
<if test="conditionParamRef.createUserId == null">
${_conditionType_} a.createUserId is null
</if>
<if test="conditionParamRef.remark == null">
${_conditionType_} a.remark is null
</if>
<if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
${_conditionType_} a.createUserId in
<foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=",">
</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()">
order by
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
field(a.id,
<foreach collection="conditionParamRef.idList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('createUserIdNotList') and conditionParamRef.createUserIdNotList.size() > 0">
${_conditionType_} a.createUserId not in
<foreach collection="conditionParamRef.createUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
<if test="conditionParamRef.containsKey('portList') and conditionParamRef.portList.size() > 0">
field(a.port,
<foreach collection="conditionParamRef.portList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('createUserIdStart') and conditionParamRef.createUserIdStart != null">
${_conditionType_} a.createUserId <![CDATA[ >= ]]> #{${_conditionParam_}.createUserIdStart}
</if>
<if test="conditionParamRef.containsKey('createUserIdEnd') and conditionParamRef.createUserIdEnd != null">
${_conditionType_} a.createUserId <![CDATA[ <= ]]> #{${_conditionParam_}.createUserIdEnd}
</if>
<if test="conditionParamRef.containsKey('updateUserId')">
<if test="conditionParamRef.updateUserId != null ">
${_conditionType_} a.updateUserId = #{${_conditionParam_}.updateUserId}
</if>
<if test="conditionParamRef.updateUserId == null">
${_conditionType_} a.updateUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
${_conditionType_} a.updateUserId in
<foreach collection="conditionParamRef.updateUserIdList" open="(" close=")" index="index" item="item" separator=",">
<if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
field(a.createUserId,
<foreach collection="conditionParamRef.createUserIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('updateUserIdNotList') and conditionParamRef.updateUserIdNotList.size() > 0">
${_conditionType_} a.updateUserId not in
<foreach collection="conditionParamRef.updateUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
<if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
field(a.updateUserId,
<foreach collection="conditionParamRef.updateUserIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('updateUserIdStart') and conditionParamRef.updateUserIdStart != null">
${_conditionType_} a.updateUserId <![CDATA[ >= ]]> #{${_conditionParam_}.updateUserIdStart}
</if>
<if test="conditionParamRef.containsKey('updateUserIdEnd') and conditionParamRef.updateUserIdEnd != null">
${_conditionType_} a.updateUserId <![CDATA[ <= ]]> #{${_conditionParam_}.updateUserIdEnd}
</if>
<if test="conditionParamRef.containsKey('updateTime')">
<if test="conditionParamRef.updateTime != null ">
${_conditionType_} a.updateTime = #{${_conditionParam_}.updateTime}
</if>
<if test="conditionParamRef.updateTime == null">
${_conditionType_} a.updateTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('updateTimeStart') and conditionParamRef.updateTimeStart != null and conditionParamRef.updateTimeStart!=''">
${_conditionType_} a.updateTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<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>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
order by
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
field(a.id,
<foreach collection="conditionParamRef.idList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('portList') and conditionParamRef.portList.size() > 0">
field(a.port,
<foreach collection="conditionParamRef.portList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
field(a.createUserId,
<foreach collection="conditionParamRef.createUserIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
field(a.updateUserId,
<foreach collection="conditionParamRef.updateUserIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<trim suffixOverrides="," suffix="">
<foreach collection="orderColList" open="" close="" index="index" item="item" separator=",">
a.${item.colName} ${item.sortKind}
a.${item.colName} ${item.sortKind}
</foreach>
</trim>
</if>
<if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()">
order by
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
field(a.id,
<foreach collection="conditionParamRef.idList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('portList') and conditionParamRef.portList.size() > 0">
field(a.port,
<foreach collection="conditionParamRef.portList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
field(a.createUserId,
<foreach collection="conditionParamRef.createUserIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
field(a.updateUserId,
<foreach collection="conditionParamRef.updateUserIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
field(a.id,
<foreach collection="conditionParamRef.idList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('portList') and conditionParamRef.portList.size() > 0">
field(a.port,
<foreach collection="conditionParamRef.portList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
field(a.createUserId,
<foreach collection="conditionParamRef.createUserIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
field(a.updateUserId,
<foreach collection="conditionParamRef.updateUserIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<trim suffixOverrides="," suffix="">
<if test="orderCol.containsKey('id')">
a.id
<if test='orderCol.id != null and "DESC".equalsIgnoreCase(orderCol.id)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('deviceName')">
a.deviceName
<if test='orderCol.deviceName != null and "DESC".equalsIgnoreCase(orderCol.deviceName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('deviceCode')">
a.deviceCode
<if test='orderCol.deviceCode != null and "DESC".equalsIgnoreCase(orderCol.deviceCode)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('ip')">
a.ip
<if test='orderCol.ip != null and "DESC".equalsIgnoreCase(orderCol.ip)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('port')">
a.port
<if test='orderCol.port != null and "DESC".equalsIgnoreCase(orderCol.port)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('username')">
a.username
<if test='orderCol.username != null and "DESC".equalsIgnoreCase(orderCol.username)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('password')">
a.password
<if test='orderCol.password != null and "DESC".equalsIgnoreCase(orderCol.password)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createTime')">
a.createTime
<if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createUserId')">
a.createUserId
<if test='orderCol.createUserId != null and "DESC".equalsIgnoreCase(orderCol.createUserId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateUserId')">
a.updateUserId
<if test='orderCol.updateUserId != null and "DESC".equalsIgnoreCase(orderCol.updateUserId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateTime')">
a.updateTime
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('id')">
a.id
<if test='orderCol.id != null and "DESC".equalsIgnoreCase(orderCol.id)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('deviceName')">
a.deviceName
<if test='orderCol.deviceName != null and "DESC".equalsIgnoreCase(orderCol.deviceName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('deviceCode')">
a.deviceCode
<if test='orderCol.deviceCode != null and "DESC".equalsIgnoreCase(orderCol.deviceCode)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('ip')">
a.ip
<if test='orderCol.ip != null and "DESC".equalsIgnoreCase(orderCol.ip)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('port')">
a.port
<if test='orderCol.port != null and "DESC".equalsIgnoreCase(orderCol.port)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('username')">
a.username
<if test='orderCol.username != null and "DESC".equalsIgnoreCase(orderCol.username)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('password')">
a.password
<if test='orderCol.password != null and "DESC".equalsIgnoreCase(orderCol.password)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createTime')">
a.createTime
<if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createUserId')">
a.createUserId
<if test='orderCol.createUserId != null and "DESC".equalsIgnoreCase(orderCol.createUserId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateUserId')">
a.updateUserId
<if test='orderCol.updateUserId != null and "DESC".equalsIgnoreCase(orderCol.updateUserId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateTime')">
a.updateTime
<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
-- 绩效表增加人员大厅字段
......@@ -1270,4 +1247,31 @@ 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`;
\ No newline at end of file
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