Commit 430438cf authored by dll's avatar dll

4-10

parents b8053e6c dfb0ca55
platform-eleme
eleme
delete-solid
delete
s-tools
setting
user-solid
user
phone
phone-outline
more
more-outline
star-on
star-off
s-goods
goods
warning
warning-outline
question
info
remove
circle-plus
success
error
zoom-in
zoom-out
remove-outline
circle-plus-outline
circle-check
circle-close
s-help
help
minus
plus
check
close
picture
picture-outline
picture-outline-round
upload
upload2
download
camera-solid
camera
video-camera-solid
video-camera
message-solid
bell
s-cooperation
s-order
s-platform
s-fold
s-unfold
s-operation
s-promotion
s-home
s-release
s-ticket
s-management
s-open
s-shop
s-marketing
s-flag
s-comment
s-finance
s-claim
s-custom
s-opportunity
s-data
s-check
s-grid
menu
share
d-caret
caret-left
caret-right
caret-bottom
caret-top
bottom-left
bottom-right
back
right
bottom
top
top-left
top-right
arrow-left
arrow-right
arrow-down
arrow-up
d-arrow-left
d-arrow-right
video-pause
video-play
refresh
refresh-right
refresh-left
finished
sort
sort-up
sort-down
rank
loading
view
c-scale-to-original
date
edit
edit-outline
folder
folder-opened
folder-add
folder-remove
folder-delete
folder-checked
tickets
document-remove
document-delete
document-copy
document-checked
document
document-add
printer
paperclip
takeaway-box
search
monitor
attract
mobile
scissors
umbrella
headset
brush
mouse
coordinate
magic-stick
reading
data-line
data-board
pie-chart
data-analysis
collection-tag
film
suitcase
suitcase-1
receiving
collection
files
notebook-1
notebook-2
toilet-paper
office-building
school
table-lamp
house
no-smoking
smoking
shopping-cart-full
shopping-cart-1
shopping-cart-2
shopping-bag-1
shopping-bag-2
sold-out
sell
present
box
bank-card
money
coin
wallet
discount
price-tag
news
guide
male
female
thumb
cpu
link
connection
open
turn-off
set-up
chat-round
chat-line-round
chat-square
chat-dot-round
chat-dot-square
chat-line-square
message
postcard
position
turn-off-microphone
microphone
close-notification
bangzhu
time
odometer
crop
aim
switch-button
full-screen
copy-document
mic
stopwatch
medal-1
medal
trophy
trophy-1
first-aid-kit
discover
place
location
location-outline
location-information
add-location
delete-location
map-location
alarm-clock
timer
watch-1
watch
lock
unlock
key
service
mobile-phone
bicycle
truck
ship
basketball
football
soccer
baseball
wind-power
light-rain
lightning
heavy-rain
sunrise
sunrise-1
sunset
sunny
cloudy
partly-cloudy
cloudy-and-sunny
moon
moon-night
dish
dish-1
food
chicken
fork-spoon
knife-fork
burger
tableware
sugar
dessert
ice-cream
hot-water
water-cup
coffee-cup
cold-drink
goblet
goblet-full
goblet-square
goblet-square-full
refrigerator
grape
watermelon
cherry
apple
pear
orange
coffee
ice-tea
ice-drink
milk-tea
potato-strips
lollipop
ice-cream-square
ice-cream-round
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</template> </template>
<style lang="less"> <style lang="less">
@media screen and (max-width: 800px){ @media screen and (max-width: 1440px){
.layout-form{ .layout-form{
form{ form{
width: 100%!important; width: 100%!important;
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
border-bottom: 1px solid #ededed; border-bottom: 1px solid #ededed;
} }
form{ form{
width: 800px; width: 1440px;
&[loading]{ &[loading]{
pointer-events: none; pointer-events: none;
.el-button{ .el-button{
......
<template> <template>
<div class="page"> <div class="page">
<LayoutTable :data="tableData" :config="tableConfig"> <LayoutTable :data="tableData" :config="tableConfig">
<el-button
slot="table-head-left2"
style="margin-left: 10px"
icon="el-icon-tickets"
size="mini"
@click="handleImport"
>导入</el-button>
<el-button
slot="table-head-left2"
style="margin-left: 10px"
icon="el-icon-tickets"
size="mini"
@click="doExport"
:disabled="isExport"
>导出</el-button>
</LayoutTable> </LayoutTable>
<!-- 员工关怀信息导入对话框 -->
<el-dialog
:title="upload.title"
:visible.sync="upload.open"
width="400px"
append-to-body
>
<el-upload
ref="upload"
:limit="1"
accept=".xlsx, .xls"
:headers="upload.headers"
:action="upload.url + '?updateSupport=' + upload.updateSupport"
:disabled="upload.isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:auto-upload="false"
drag
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">
将文件拖到此处,或
<em>点击上传</em>
</div>
<div class="el-upload__tip" slot="tip">
<el-checkbox
v-model="upload.updateSupport"
/>是否更新已经存在的数据
<el-link type="primary" style="font-size: 14px" @click="downloadTemplate"
>下载模板</el-link
>
</div>
<div class="el-upload__tip" style="color: red" slot="tip">
提示:仅允许导入“xls”或“xlsx”格式文件!
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm">确 定</el-button>
<el-button @click="upload.open = false">取 消</el-button>
</div>
</el-dialog>
<drawer-show ref="drawerform" @ok="getData" /> <drawer-show ref="drawerform" @ok="getData" />
</div> </div>
</template> </template>
<script> <script>
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import drawerShow from "./drawershow"; import drawerShow from "./drawershow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
export default { export default {
name: "StaffCareList", name: "StaffCareList",
components: { components: {
drawerShow drawerShow
}, },
mixins: [table], mixins: [table],
created() { created() {
}, },
methods: { methods: {
/** 导入 */
handleImport() {
this.upload.title = "员工关怀信息导入";
this.upload.open = true;
},
/** 下载模板操作 */
downloadTemplate() {
this.isExport = true;
this.$download("/staff/care/downloadTemplate", {}, { type: "excel" })
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 文件上传中处理 */
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
/** 文件上传成功处理 */
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
this.getData();
},
/** 提交上传文件 */
submitFileForm() {
this.$refs.upload.submit();
},
/** 导出Excel */
doExport() {
this.isExport = true;
this.$download("/staff/care/exportExcel", {
"idList": this.selection,
'staffName': this.$route.query['staffName'],
'careType': this.$route.query['careType'],
'sendStatus': this.$route.query['sendStatus'],
}, { type: "excel" }).then(() => this.isExport = false).catch(error => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 重写新增方法 */ /** 重写新增方法 */
toAdd(row) { toAdd(row) {
this.$refs.drawerform.add(row); this.$refs.drawerform.add(row);
...@@ -33,12 +133,23 @@ ...@@ -33,12 +133,23 @@
toView(row) { toView(row) {
this.$refs.drawerform.view(row); this.$refs.drawerform.view(row);
}, },
},
data() { data() {
return { return {
// 用户导入参数
upload: {
// 是否显示弹出层(员工关怀信息导入)
open: false,
// 弹出层标题(员工关怀信息导入)
title: "导入员工关怀信息数据",
// 是否禁用上传
isUploading: false,
// 是否更新已经存在的数据
updateSupport: 0,
// 上传的地址
url: "/attendance/staff/care/importData",
},
isExport: false,
config: { config: {
isshowTabPane:true,
search: [ search: [
{ {
name: "staffName", name: "staffName",
...@@ -50,7 +161,6 @@ ...@@ -50,7 +161,6 @@
columns: [ columns: [
{type: "selection", width: 60}, {type: "selection", width: 60},
{type: "index",label: "序号",width: 50}, {type: "index",label: "序号",width: 50},
{label: "员工姓名", prop: "staffName"}, {label: "员工姓名", prop: "staffName"},
{label: "入职时间", prop: "entryDate", formatter: this.formatterDate}, {label: "入职时间", prop: "entryDate", formatter: this.formatterDate},
...@@ -71,7 +181,8 @@ ...@@ -71,7 +181,8 @@
} }
] ]
} }
};
} }
}; }
}
}
</script> </script>
\ No newline at end of file
<template> <template>
<layout-form> <layout-form >
<el-form <el-form
:model="form" :model="form"
:loading="loading" :loading="loading"
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
label-width='100px' label-width='100px'
ref="form" ref="form"
> >
<el-row> <el-row :span='20'>
<Field label="ID" prop="id" v-model="form.id" v-if='pageInfo.type !== "add"' disabled /> <Field label="ID" prop="id" v-model="form.id" v-if='pageInfo.type !== "add"' disabled />
<Field label="名称" prop="name" v-model="form.name"/> <Field label="名称" prop="name" v-model="form.name"/>
<Field label="权限类型" prop="authType" v-model="form.authType" :enumData='dict.authType' type='select' /> <Field label="权限类型" prop="authType" v-model="form.authType" :enumData='dict.authType' type='select' />
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<el-radio-group v-model="form.imgPath" class='form-el-radio-group'> <el-radio-group v-model="form.imgPath" class='form-el-radio-group'>
<el-radio-button label="">不需要图标</el-radio-button> <el-radio-button label="">不需要图标</el-radio-button>
<el-radio-button v-for='(icon, index) in icons' :key='index' :label="icon"> <el-radio-button v-for='(icon, index) in icons' :key='index' :label="icon">
<i :class="'el-icon-'+icon"></i> <i :class="'el-icon-'+icon" style="font-size: 20px"></i>
{{icon}} {{icon}}
</el-radio-button> </el-radio-button>
</el-radio-group> </el-radio-group>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<script> <script>
import form from '@/assets/mixins/form'; import form from '@/assets/mixins/form';
import axios from 'axios'
export default { export default {
mixins: [form], mixins: [form],
methods: { methods: {
...@@ -40,28 +40,36 @@ export default { ...@@ -40,28 +40,36 @@ export default {
this.$store.dispatch('login'); this.$store.dispatch('login');
this.$router.go(-1); this.$router.go(-1);
}, },
// 合并父子数组 },
combineArr(Array,menu){ created() {
Array.forEach(item => { axios.get('/icon.txt')
if(item.childList.length>0){ .then(response => {
menu[item.id+''] = item.name this.fileContent = response.data
this.combineArr(item.childList,menu) this.icons = this.fileContent.split('\n')
}else{ //this.lines.map(i=>console.log(i))
menu[item.id+''] = item.name
}
}) })
}
}, },
computed: { computed: {
menu() { menu() {
let menu = {'0': ''}; let menu = {'0': ''};
this.combineArr(this.$store.state.userData.barList,menu) this.$store.state.userData.barList.forEach(item=>{
console.log(menu) menu[item.id+''] = item.name
});
return menu; return menu;
} }
}, },
// mounted() {
// axios.get('/icon.txt')
// .then(response => {
// this.fileContent = response.data
// this.lines = this.fileContent.split('\n')
// this.lines.map(i=>console.log(i))
// })
// },
data() { data() {
return { return {
fileContent:"",
toString: ['parentId', 'authType', 'status'], toString: ['parentId', 'authType', 'status'],
icons: [ icons: [
'info', 'error', 'success', 'warning', 'question', 'info', 'error', 'success', 'warning', 'question',
......
package com.mortals.xhx.base.framework.config;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Map;
/**
* @author djx
* @date 2023年04月10日 11:53
*/
@Component
public class JsonUtils {
@Autowired
private ObjectMapper objectMapper;
public String bean2Json(Object data) {
try {
String result = objectMapper.writeValueAsString(data);
return result;
} catch (JsonProcessingException e) {
e.printStackTrace();
}
return null;
}
public <T> T json2Bean(String jsonData, Class<T> beanType) {
try {
T result = objectMapper.readValue(jsonData, beanType);
return result;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
public <T> List<T> json2List(String jsonData, Class<T> beanType) {
JavaType javaType = objectMapper.getTypeFactory().constructParametricType(List.class, beanType);
try {
List<T> resultList = objectMapper.readValue(jsonData, javaType);
return resultList;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
public <K, V> Map<K, V> json2Map(String jsonData, Class<K> keyType, Class<V> valueType) {
JavaType javaType = objectMapper.getTypeFactory().constructMapType(Map.class, keyType, valueType);
try {
Map<K, V> resultMap = objectMapper.readValue(jsonData, javaType);
return resultMap;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
}
...@@ -94,6 +94,35 @@ public class ArtemisPostTest { ...@@ -94,6 +94,35 @@ public class ArtemisPostTest {
} }
public static String callPostApiGetDeptList() throws Exception {
/**
* https://ip:port/artemis/api/resource/v1/org/orgList
* 通过查阅AI Cloud开放平台文档或网关门户的文档可以看到获取组织列表的接口定义,该接口为POST请求的Rest接口, 入参为JSON字符串,接口协议为https。
* ArtemisHttpUtil工具类提供了doPostStringArtemis调用POST请求的方法,入参可传JSON字符串, 请阅读开发指南了解方法入参,没有的参数可传null
*/
ArtemisConfig config = new ArtemisConfig();
config.setHost("8.136.255.30:8001"); // 代理API网关nginx服务器ip端口
config.setAppKey("25128371"); // 秘钥appkey
config.setAppSecret("2m9RcPJOKq5j2QPQM4v5");// 秘钥appSecret
final String getCamsApi = ARTEMIS_PATH + "/api/resource/v1/person/personList";
Map<String, String> paramMap = new HashMap<String, String>();// post请求Form表单参数
paramMap.put("pageNo", "1");
paramMap.put("pageSize", "10");
String body = JSON.toJSON(paramMap).toString();
Map<String, String> path = new HashMap<String, String>(2) {
{
put("http://", getCamsApi);
}
};
return ArtemisHttpUtil.doPostStringArtemis(config,path, body, null, null, "application/json");
}
/** /**
* 调用POST请求类型接口,这里以分页获取区域列表为例 * 调用POST请求类型接口,这里以分页获取区域列表为例
* 接口实际url:https://ip:port/artemis/api/api/resource/v1/regions * 接口实际url:https://ip:port/artemis/api/api/resource/v1/regions
......
package com.mortals.xhx.busiz.rsp;
import lombok.Data;
import java.util.List;
/**
* @author djx
* @date 2023年04月10日 11:56
*/
@Data
public class DeptHikData {
private int total;
private int pageNo;
private int pageSize;
private List<ListDept> list;
}
\ No newline at end of file
package com.mortals.xhx.busiz.rsp;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author djx
* @date 2023年04月10日 11:54
*/
@NoArgsConstructor
@Data
public class ListDept {
//部门编号--最底层
private String orgIndexCode;
//空
private String orgNo;
//部门名字--底层
private String orgName;
//部门全路径
private String orgPath;
//上级部门编号
private String parentOrgIndexCode;
//上层部门名臣
private Object parentOrgName;
//修改时间
private Object updateTime;
}
...@@ -4,22 +4,40 @@ import lombok.Data; ...@@ -4,22 +4,40 @@ import lombok.Data;
@Data @Data
public class ListItem{ public class ListItem{
//空
private Object birthday; private Object birthday;
//
private String orgName; private String orgName;
//空
private Object address; private Object address;
//空
private Object education; private Object education;
//性别
private int gender; private int gender;
//部门全路径
private String orgPath; private String orgPath;
//空
private Object nation; private Object nation;
//部门code
private String orgIndexCode; private String orgIndexCode;
private String updateTime; private String updateTime;
//证书
private String certificateNo; private String certificateNo;
//空
private Object phoneNo; private Object phoneNo;
//姓名
private String personName; private String personName;
//身份证信息
private PersonPhoto personPhoto; private PersonPhoto personPhoto;
//
private String jobNo; private String jobNo;
//海康id
private String personId; private String personId;
//指纹
private Object fingerPrint; private Object fingerPrint;
//空
private Object email; private Object email;
//
private int certificateType; private int certificateType;
} }
\ No newline at end of file
...@@ -9,10 +9,10 @@ import java.util.Map; ...@@ -9,10 +9,10 @@ import java.util.Map;
* @author zxfei * @author zxfei
*/ */
public enum AttendanceTypeEnum { public enum AttendanceTypeEnum {
地点打卡. 地点打卡("地点打卡. 地点打卡", "地点打卡. 地点打卡"), 地点打卡("地点打卡", "地点打卡"),
Wi-Fi打卡. Wi-Fi打卡("Wi-Fi打卡. Wi-Fi打卡", "Wi-Fi打卡. Wi-Fi打卡"), WiFi打卡("Wi-Fi打卡", "Wi-Fi打卡"),
蓝牙打卡. 蓝牙打卡("蓝牙打卡. 蓝牙打卡", "蓝牙打卡. 蓝牙打卡"), 蓝牙打卡("蓝牙打卡", "蓝牙打卡"),
考勤机打卡. 考勤机打卡("考勤机打卡. 考勤机打卡", "考勤机打卡. 考勤机打卡"); 考勤机打卡("考勤机打卡", "考勤机打卡");
private String value; private String value;
private String desc; private String desc;
......
...@@ -3,101 +3,132 @@ package com.mortals.xhx.daemon.task; ...@@ -3,101 +3,132 @@ package com.mortals.xhx.daemon.task;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.ITask; import com.mortals.framework.service.ITask;
import com.mortals.framework.service.ITaskExcuteService; import com.mortals.framework.service.ITaskExcuteService;
import com.mortals.xhx.base.framework.config.JsonUtils;
import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.busiz.hik.ArtemisPostTest;
import com.mortals.xhx.busiz.rsp.DeptHikData;
import com.mortals.xhx.busiz.rsp.ListDept;
import com.mortals.xhx.busiz.rsp.ListItem;
import com.mortals.xhx.busiz.rsp.PersonHikData;
import com.mortals.xhx.feign.user.IUserFeign;
import com.mortals.xhx.module.dept.dao.ibatis.DeptDaoImpl;
import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.staff.dao.ibatis.StaffDaoImpl;
import com.mortals.xhx.module.staff.model.StaffEntity;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
import java.util.Objects;
/** /**
* 同步用户 * 同步用户
*/ */
@Slf4j @Slf4j
//@Service("SyncUserTask") @Service("SyncUserTask")
public class SyncUserTaskImpl implements ITaskExcuteService { public class SyncUserTaskImpl implements ITaskExcuteService {
@Autowired
private UserService userService;
@Autowired
private IUserFeign userFeign;
@Autowired
private JsonUtils jsonUtils;
@Autowired
private StaffDaoImpl staffDao;
@Autowired
private DeptDaoImpl deptDao;
@Override @Override
public void excuteTask(ITask task) throws AppException { public void excuteTask(ITask task) throws AppException {
log.info("同步用户"); log.info("同步用户--部门");
/*SitePdu sitePdu = new SitePdu(); try {
sitePdu.setId(1L); String resultPerson = ArtemisPostTest.callPostApiGetPersonList();
Rest<List<SitePdu>> siteRest = siteFeign.getFlatSitesBySiteId(sitePdu); PersonHikData personHikData = jsonUtils.json2Bean(resultPerson, PersonHikData.class);
if (siteRest.getCode() == YesNoEnum.YES.getValue()) { if (Objects.nonNull(personHikData)) {
log.info("站点总数量:{}", siteRest.getData().size()); for (ListItem list : personHikData.getList()) {
siteRest.getData().forEach(site -> { //根据id获取本地数据
log.info("站点名称:{}",site.getSiteName()); StaffEntity staffEntity1 = staffDao.get(Long.valueOf(list.getPersonId()));
DevicePdu devicePdu = new DevicePdu(); List<StaffEntity> staffEntitieList = staffDao.queryAllList();
devicePdu.setProductCode("ybj"); //判断本地数据是否为空
devicePdu.setSize(-1); if (Objects.isNull(staffEntity1)) {
Rest<RespData<List<DevicePdu>>> deviceRest = deviceFeign.list(devicePdu); //如果为空则将数据存入数据库
log.info("deviceRest:{}", JSON.toJSONString(deviceRest)); staffEntity1.setName(list.getPersonName());
if (YesNoEnum.YES.getValue() == deviceRest.getCode()) { staffEntity1.setRemark(list.getPersonId());
List<DevicePdu> devicePduList = deviceRest.getData().getData(); staffEntity1.setPhotoPath(list.getPersonPhoto().getPicUri());
log.info("样表机总数量:{}", devicePduList.size()); staffEntity1.setDeptName(list.getOrgName());
if (!ObjectUtils.isEmpty(devicePduList)) { staffEntity1.setDeptId(Long.valueOf(list.getOrgIndexCode()));
List<DeviceEntity> newDeviceList = devicePduList.stream().map(newDevice -> { staffEntity1.setDeptName(list.getOrgName());
DeviceEntity deviceEntity = new DeviceEntity(); if (list.getBirthday()!=null){
deviceEntity.initAttrValue(); staffEntity1.setBirthday((Date) list.getBirthday());
BeanUtils.copyProperties(newDevice, deviceEntity, BeanUtil.getNullPropertyNames(newDevice)); }
return deviceEntity; if (list.getPhoneNo()!=null){
}).collect(Collectors.toList()); staffEntity1.setPhoneNumber(String.valueOf(list.getPhoneNo()));
}
List<DeviceEntity> oldDeviceList = deviceService.find(new DeviceQuery().siteId(site.getId())); staffDao.insert(staffEntity1);
Map<String, DeviceEntity> oldDeviceMap = oldDeviceList.stream().collect(Collectors.toMap(x -> x.getDeviceCode(), y -> y, (o, n) -> n)); }
Map<String, DeviceEntity> newDeviceMap = newDeviceList.stream().collect(Collectors.toMap(x -> x.getDeviceCode(), y -> y, (o, n) -> n)); //本地数据不为空
else {
List<DeviceEntity> updateDeviceLsit = newDeviceList.stream().map(item -> { //本地数据遍历数据
if (oldDeviceMap.containsKey(item.getDeviceCode())) { for (StaffEntity staffEntity : staffEntitieList) {
item.setId(oldDeviceMap.get(item.getDeviceCode()).getId()); //如果本地的id等于海康的id
item.setDeviceId(item.getId()); if (staffEntity.getRemark().equals(list.getPersonId())) {
item.setProductCode(oldDeviceMap.get(item.getDeviceCode()).getProductCode()); //执行修改
item.setProductName(oldDeviceMap.get(item.getDeviceCode()).getProductName()); staffEntity.setName(list.getPersonName());
item.setUpdateTime(new Date()); staffEntity.setPhotoPath(list.getPersonPhoto().getPicUri());
return item; staffEntity.setDeptName(list.getOrgName());
} staffDao.update(staffEntity);
return null; }
}).filter(f -> f != null).collect(Collectors.toList()); for (ListItem item :personHikData.getList()){
//如果本地id不等于海康id并且海康id不等于本地id
List<DeviceEntity> saveDeviceList = newDeviceList.stream().map(item -> { if (!item.getPersonId().equals(staffEntity.getRemark())){
if (!oldDeviceMap.containsKey(item.getDeviceCode())) { //否则执行删除
item.setDeviceId(item.getId()); staffDao.delete(Long.valueOf(staffEntity.getRemark()));
item.setCreateUserId(1L);
item.setCreateUserName("系统管理员"); }
item.setCreateTime(new Date()); }
return item;
}
return null;
}).filter(f -> f != null).collect(Collectors.toList());
//做差集
List<Long> delDeviceList = oldDeviceList.stream().map(item -> {
if (!newDeviceMap.containsKey(item.getDeviceCode())) {
return item.getId();
}
return null;
}).filter(f -> f != null).collect(Collectors.toList());
if (!ObjectUtils.isEmpty(updateDeviceLsit)) {
log.info("设备更新,size:{}", updateDeviceLsit.size());
deviceService.update(updateDeviceLsit);
}
if (!ObjectUtils.isEmpty(saveDeviceList)) {
log.info("设备新增,size:{}", saveDeviceList.size());
deviceService.save(saveDeviceList);
}
if (!ObjectUtils.isEmpty(delDeviceList)) {
log.info("设备删除,size:{}", delDeviceList.size());
deviceService.remove(delDeviceList,null);
}
}
} else {
log.info("设备列表查询异常,{}", JSON.toJSONString(deviceRest));
}
});
} else {
log.info("站点列表查询异常,{}", JSON.toJSONString(siteRest));
}*/
} }
}
}
}
String resultDept = ArtemisPostTest.callPostApiGetDeptList();
DeptHikData deptHikData = jsonUtils.json2Bean(resultDept,DeptHikData.class);
if (Objects.isNull(deptHikData)){
for (ListDept listDept:deptHikData.getList()){
DeptEntity deptEntity = deptDao.get(Long.valueOf(listDept.getOrgIndexCode()));
List<DeptEntity> deptEntityList = deptDao.queryAllList();
if (Objects.isNull(deptEntity)){
deptEntity.setDeptName(listDept.getOrgName());
deptEntity.setParentId(Long.valueOf(listDept.getParentOrgIndexCode()));
deptEntity.setAncestors(listDept.getOrgPath());
deptDao.insert(deptEntity);
}else {
for (DeptEntity deptEntity1 :deptEntityList){
if (!deptEntity1.getParentId().equals(listDept.getOrgIndexCode())){
deptEntity1.setAncestors(listDept.getOrgPath());
deptEntity1.setDeptName(listDept.getOrgName());
deptDao.update(deptEntity1);
}
for (ListDept dept : deptHikData.getList()){
if (!dept.getOrgIndexCode().equals(deptEntity1.getParentId())){
deptDao.delete(Long.valueOf(listDept.getOrgIndexCode()));
}
}
}
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
@Override @Override
......
...@@ -8,11 +8,11 @@ import com.mortals.framework.annotation.Excel; ...@@ -8,11 +8,11 @@ import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.attendance.model.vo.AttendanceGroupFixedworkSpecialVo; import com.mortals.xhx.module.attendance.model.vo.AttendanceGroupFixedworkSpecialVo;
/** /**
* 考勤组考勤固定班制特殊日期配置实体对象 * 考勤组考勤固定班制特殊日期配置实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-04-08 * @date 2023-04-10
*/ */
public class AttendanceGroupFixedworkSpecialEntity extends AttendanceGroupFixedworkSpecialVo { public class AttendanceGroupFixedworkSpecialEntity extends AttendanceGroupFixedworkSpecialVo {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -42,17 +42,17 @@ public class AttendanceGroupFixedworkSpecialEntity extends AttendanceGroupFixedw ...@@ -42,17 +42,17 @@ public class AttendanceGroupFixedworkSpecialEntity extends AttendanceGroupFixedw
*/ */
private Date specialTime; private Date specialTime;
/** /**
* 时间段时候开始时间 * 备注
*/ */
private Date specialTimeStart; private String remark;
/** /**
* 时间段结束时间 * 时间段时候开始时间
*/ */
private Date specialTimeEnd; private Date specialStartTime;
/** /**
* 备注 * 时间段结束时间
*/ */
private String remark; private Date specialEndTime;
...@@ -142,46 +142,46 @@ public class AttendanceGroupFixedworkSpecialEntity extends AttendanceGroupFixedw ...@@ -142,46 +142,46 @@ public class AttendanceGroupFixedworkSpecialEntity extends AttendanceGroupFixedw
this.specialTime = specialTime; this.specialTime = specialTime;
} }
/** /**
* 获取 时间段时候开始时间 * 获取 备注
* @return Date * @return String
*/ */
public Date getSpecialTimeStart(){ public String getRemark(){
return specialTimeStart; return remark;
} }
/** /**
* 设置 时间段时候开始时间 * 设置 备注
* @param specialTimeStart * @param remark
*/ */
public void setSpecialTimeStart(Date specialTimeStart){ public void setRemark(String remark){
this.specialTimeStart = specialTimeStart; this.remark = remark;
} }
/** /**
* 获取 时间段结束时间 * 获取 时间段时候开始时间
* @return Date * @return Date
*/ */
public Date getSpecialTimeEnd(){ public Date getSpecialStartTime(){
return specialTimeEnd; return specialStartTime;
} }
/** /**
* 设置 时间段结束时间 * 设置 时间段时候开始时间
* @param specialTimeEnd * @param specialStartTime
*/ */
public void setSpecialTimeEnd(Date specialTimeEnd){ public void setSpecialStartTime(Date specialStartTime){
this.specialTimeEnd = specialTimeEnd; this.specialStartTime = specialStartTime;
} }
/** /**
* 获取 备注 * 获取 时间段结束时间
* @return String * @return Date
*/ */
public String getRemark(){ public Date getSpecialEndTime(){
return remark; return specialEndTime;
} }
/** /**
* 设置 备注 * 设置 时间段结束时间
* @param remark * @param specialEndTime
*/ */
public void setRemark(String remark){ public void setSpecialEndTime(Date specialEndTime){
this.remark = remark; this.specialEndTime = specialEndTime;
} }
...@@ -211,9 +211,9 @@ public class AttendanceGroupFixedworkSpecialEntity extends AttendanceGroupFixedw ...@@ -211,9 +211,9 @@ public class AttendanceGroupFixedworkSpecialEntity extends AttendanceGroupFixedw
sb.append(",className:").append(getClassName()); sb.append(",className:").append(getClassName());
sb.append(",addWay:").append(getAddWay()); sb.append(",addWay:").append(getAddWay());
sb.append(",specialTime:").append(getSpecialTime()); sb.append(",specialTime:").append(getSpecialTime());
sb.append(",specialTimeStart:").append(getSpecialTimeStart());
sb.append(",specialTimeEnd:").append(getSpecialTimeEnd());
sb.append(",remark:").append(getRemark()); sb.append(",remark:").append(getRemark());
sb.append(",specialStartTime:").append(getSpecialStartTime());
sb.append(",specialEndTime:").append(getSpecialEndTime());
return sb.toString(); return sb.toString();
} }
...@@ -231,10 +231,10 @@ public class AttendanceGroupFixedworkSpecialEntity extends AttendanceGroupFixedw ...@@ -231,10 +231,10 @@ public class AttendanceGroupFixedworkSpecialEntity extends AttendanceGroupFixedw
this.specialTime = null; this.specialTime = null;
this.specialTimeStart = null; this.remark = "";
this.specialTimeEnd = null; this.specialStartTime = null;
this.remark = ""; this.specialEndTime = null;
} }
} }
\ No newline at end of file
...@@ -4,11 +4,11 @@ import java.util.Date; ...@@ -4,11 +4,11 @@ import java.util.Date;
import java.util.List; import java.util.List;
import com.mortals.xhx.module.attendance.model.AttendanceGroupFixedworkSpecialEntity; import com.mortals.xhx.module.attendance.model.AttendanceGroupFixedworkSpecialEntity;
/** /**
* 考勤组考勤固定班制特殊日期配置查询对象 * 考勤组考勤固定班制特殊日期配置查询对象
* *
* @author zxfei * @author zxfei
* @date 2023-04-08 * @date 2023-04-10
*/ */
public class AttendanceGroupFixedworkSpecialQuery extends AttendanceGroupFixedworkSpecialEntity { public class AttendanceGroupFixedworkSpecialQuery extends AttendanceGroupFixedworkSpecialEntity {
/** 开始 序号,主键,自增长 */ /** 开始 序号,主键,自增长 */
private Long idStart; private Long idStart;
...@@ -96,18 +96,6 @@ public class AttendanceGroupFixedworkSpecialQuery extends AttendanceGroupFixedwo ...@@ -96,18 +96,6 @@ public class AttendanceGroupFixedworkSpecialQuery extends AttendanceGroupFixedwo
/** 结束 特殊时间 */ /** 结束 特殊时间 */
private String specialTimeEnd; private String specialTimeEnd;
/** 开始 时间段时候开始时间 */
private String specialTimeStartStart;
/** 结束 时间段时候开始时间 */
private String specialTimeStartEnd;
/** 开始 时间段结束时间 */
private String specialTimeEndStart;
/** 结束 时间段结束时间 */
private String specialTimeEndEnd;
/** 备注 */ /** 备注 */
private List<String> remarkList; private List<String> remarkList;
...@@ -155,6 +143,18 @@ public class AttendanceGroupFixedworkSpecialQuery extends AttendanceGroupFixedwo ...@@ -155,6 +143,18 @@ public class AttendanceGroupFixedworkSpecialQuery extends AttendanceGroupFixedwo
/** 结束 更新时间 */ /** 结束 更新时间 */
private String updateTimeEnd; private String updateTimeEnd;
/** 开始 时间段时候开始时间 */
private String specialStartTimeStart;
/** 结束 时间段时候开始时间 */
private String specialStartTimeEnd;
/** 开始 时间段结束时间 */
private String specialEndTimeStart;
/** 结束 时间段结束时间 */
private String specialEndTimeEnd;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */ /** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<AttendanceGroupFixedworkSpecialQuery> orConditionList; private List<AttendanceGroupFixedworkSpecialQuery> orConditionList;
...@@ -632,70 +632,6 @@ public class AttendanceGroupFixedworkSpecialQuery extends AttendanceGroupFixedwo ...@@ -632,70 +632,6 @@ public class AttendanceGroupFixedworkSpecialQuery extends AttendanceGroupFixedwo
this.specialTimeEnd = specialTimeEnd; this.specialTimeEnd = specialTimeEnd;
} }
/**
* 获取 开始 时间段时候开始时间
* @return specialTimeStartStart
*/
public String getSpecialTimeStartStart(){
return this.specialTimeStartStart;
}
/**
* 设置 开始 时间段时候开始时间
* @param specialTimeStartStart
*/
public void setSpecialTimeStartStart(String specialTimeStartStart){
this.specialTimeStartStart = specialTimeStartStart;
}
/**
* 获取 结束 时间段时候开始时间
* @return specialTimeStartEnd
*/
public String getSpecialTimeStartEnd(){
return this.specialTimeStartEnd;
}
/**
* 设置 结束 时间段时候开始时间
* @param specialTimeStartEnd
*/
public void setSpecialTimeStartEnd(String specialTimeStartEnd){
this.specialTimeStartEnd = specialTimeStartEnd;
}
/**
* 获取 开始 时间段结束时间
* @return specialTimeEndStart
*/
public String getSpecialTimeEndStart(){
return this.specialTimeEndStart;
}
/**
* 设置 开始 时间段结束时间
* @param specialTimeEndStart
*/
public void setSpecialTimeEndStart(String specialTimeEndStart){
this.specialTimeEndStart = specialTimeEndStart;
}
/**
* 获取 结束 时间段结束时间
* @return specialTimeEndEnd
*/
public String getSpecialTimeEndEnd(){
return this.specialTimeEndEnd;
}
/**
* 设置 结束 时间段结束时间
* @param specialTimeEndEnd
*/
public void setSpecialTimeEndEnd(String specialTimeEndEnd){
this.specialTimeEndEnd = specialTimeEndEnd;
}
/** /**
* 获取 备注 * 获取 备注
* @return remarkList * @return remarkList
...@@ -954,6 +890,70 @@ public class AttendanceGroupFixedworkSpecialQuery extends AttendanceGroupFixedwo ...@@ -954,6 +890,70 @@ public class AttendanceGroupFixedworkSpecialQuery extends AttendanceGroupFixedwo
this.updateTimeEnd = updateTimeEnd; this.updateTimeEnd = updateTimeEnd;
} }
/**
* 获取 开始 时间段时候开始时间
* @return specialStartTimeStart
*/
public String getSpecialStartTimeStart(){
return this.specialStartTimeStart;
}
/**
* 设置 开始 时间段时候开始时间
* @param specialStartTimeStart
*/
public void setSpecialStartTimeStart(String specialStartTimeStart){
this.specialStartTimeStart = specialStartTimeStart;
}
/**
* 获取 结束 时间段时候开始时间
* @return specialStartTimeEnd
*/
public String getSpecialStartTimeEnd(){
return this.specialStartTimeEnd;
}
/**
* 设置 结束 时间段时候开始时间
* @param specialStartTimeEnd
*/
public void setSpecialStartTimeEnd(String specialStartTimeEnd){
this.specialStartTimeEnd = specialStartTimeEnd;
}
/**
* 获取 开始 时间段结束时间
* @return specialEndTimeStart
*/
public String getSpecialEndTimeStart(){
return this.specialEndTimeStart;
}
/**
* 设置 开始 时间段结束时间
* @param specialEndTimeStart
*/
public void setSpecialEndTimeStart(String specialEndTimeStart){
this.specialEndTimeStart = specialEndTimeStart;
}
/**
* 获取 结束 时间段结束时间
* @return specialEndTimeEnd
*/
public String getSpecialEndTimeEnd(){
return this.specialEndTimeEnd;
}
/**
* 设置 结束 时间段结束时间
* @param specialEndTimeEnd
*/
public void setSpecialEndTimeEnd(String specialEndTimeEnd){
this.specialEndTimeEnd = specialEndTimeEnd;
}
/** /**
* 设置 序号,主键,自增长 * 设置 序号,主键,自增长
* @param id * @param id
...@@ -1245,8 +1245,6 @@ public class AttendanceGroupFixedworkSpecialQuery extends AttendanceGroupFixedwo ...@@ -1245,8 +1245,6 @@ public class AttendanceGroupFixedworkSpecialQuery extends AttendanceGroupFixedwo
/** /**
* 设置 备注 * 设置 备注
* @param remark * @param remark
...@@ -1375,6 +1373,8 @@ public class AttendanceGroupFixedworkSpecialQuery extends AttendanceGroupFixedwo ...@@ -1375,6 +1373,8 @@ public class AttendanceGroupFixedworkSpecialQuery extends AttendanceGroupFixedwo
} }
/** /**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) * 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList * @return orConditionList
......
...@@ -8,11 +8,11 @@ import com.mortals.framework.annotation.Excel; ...@@ -8,11 +8,11 @@ import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.attendance.model.vo.AttendanceGroupFreeworkSpecialVo; import com.mortals.xhx.module.attendance.model.vo.AttendanceGroupFreeworkSpecialVo;
/** /**
* 考勤组考勤自由工时特殊日期配置实体对象 * 考勤组考勤自由工时特殊日期配置实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-04-08 * @date 2023-04-10
*/ */
public class AttendanceGroupFreeworkSpecialEntity extends AttendanceGroupFreeworkSpecialVo { public class AttendanceGroupFreeworkSpecialEntity extends AttendanceGroupFreeworkSpecialVo {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -42,17 +42,17 @@ public class AttendanceGroupFreeworkSpecialEntity extends AttendanceGroupFreewor ...@@ -42,17 +42,17 @@ public class AttendanceGroupFreeworkSpecialEntity extends AttendanceGroupFreewor
*/ */
private Date specialTime; private Date specialTime;
/** /**
* 时间段时候开始时间 * 备注
*/ */
private Date specialTimeStart; private String remark;
/** /**
* 时间段结束时间 * 时间段时候开始时间
*/ */
private Date specialTimeEnd; private Date specialStartTime;
/** /**
* 备注 * 时间段结束时间
*/ */
private String remark; private Date specialEndTime;
...@@ -142,46 +142,46 @@ public class AttendanceGroupFreeworkSpecialEntity extends AttendanceGroupFreewor ...@@ -142,46 +142,46 @@ public class AttendanceGroupFreeworkSpecialEntity extends AttendanceGroupFreewor
this.specialTime = specialTime; this.specialTime = specialTime;
} }
/** /**
* 获取 时间段时候开始时间 * 获取 备注
* @return Date * @return String
*/ */
public Date getSpecialTimeStart(){ public String getRemark(){
return specialTimeStart; return remark;
} }
/** /**
* 设置 时间段时候开始时间 * 设置 备注
* @param specialTimeStart * @param remark
*/ */
public void setSpecialTimeStart(Date specialTimeStart){ public void setRemark(String remark){
this.specialTimeStart = specialTimeStart; this.remark = remark;
} }
/** /**
* 获取 时间段结束时间 * 获取 时间段时候开始时间
* @return Date * @return Date
*/ */
public Date getSpecialTimeEnd(){ public Date getSpecialStartTime(){
return specialTimeEnd; return specialStartTime;
} }
/** /**
* 设置 时间段结束时间 * 设置 时间段时候开始时间
* @param specialTimeEnd * @param specialStartTime
*/ */
public void setSpecialTimeEnd(Date specialTimeEnd){ public void setSpecialStartTime(Date specialStartTime){
this.specialTimeEnd = specialTimeEnd; this.specialStartTime = specialStartTime;
} }
/** /**
* 获取 备注 * 获取 时间段结束时间
* @return String * @return Date
*/ */
public String getRemark(){ public Date getSpecialEndTime(){
return remark; return specialEndTime;
} }
/** /**
* 设置 备注 * 设置 时间段结束时间
* @param remark * @param specialEndTime
*/ */
public void setRemark(String remark){ public void setSpecialEndTime(Date specialEndTime){
this.remark = remark; this.specialEndTime = specialEndTime;
} }
...@@ -211,9 +211,9 @@ public class AttendanceGroupFreeworkSpecialEntity extends AttendanceGroupFreewor ...@@ -211,9 +211,9 @@ public class AttendanceGroupFreeworkSpecialEntity extends AttendanceGroupFreewor
sb.append(",className:").append(getClassName()); sb.append(",className:").append(getClassName());
sb.append(",addWay:").append(getAddWay()); sb.append(",addWay:").append(getAddWay());
sb.append(",specialTime:").append(getSpecialTime()); sb.append(",specialTime:").append(getSpecialTime());
sb.append(",specialTimeStart:").append(getSpecialTimeStart());
sb.append(",specialTimeEnd:").append(getSpecialTimeEnd());
sb.append(",remark:").append(getRemark()); sb.append(",remark:").append(getRemark());
sb.append(",specialStartTime:").append(getSpecialStartTime());
sb.append(",specialEndTime:").append(getSpecialEndTime());
return sb.toString(); return sb.toString();
} }
...@@ -231,10 +231,10 @@ public class AttendanceGroupFreeworkSpecialEntity extends AttendanceGroupFreewor ...@@ -231,10 +231,10 @@ public class AttendanceGroupFreeworkSpecialEntity extends AttendanceGroupFreewor
this.specialTime = null; this.specialTime = null;
this.specialTimeStart = null; this.remark = "";
this.specialTimeEnd = null; this.specialStartTime = null;
this.remark = ""; this.specialEndTime = null;
} }
} }
\ No newline at end of file
...@@ -4,11 +4,11 @@ import java.util.Date; ...@@ -4,11 +4,11 @@ import java.util.Date;
import java.util.List; import java.util.List;
import com.mortals.xhx.module.attendance.model.AttendanceGroupFreeworkSpecialEntity; import com.mortals.xhx.module.attendance.model.AttendanceGroupFreeworkSpecialEntity;
/** /**
* 考勤组考勤自由工时特殊日期配置查询对象 * 考勤组考勤自由工时特殊日期配置查询对象
* *
* @author zxfei * @author zxfei
* @date 2023-04-08 * @date 2023-04-10
*/ */
public class AttendanceGroupFreeworkSpecialQuery extends AttendanceGroupFreeworkSpecialEntity { public class AttendanceGroupFreeworkSpecialQuery extends AttendanceGroupFreeworkSpecialEntity {
/** 开始 序号,主键,自增长 */ /** 开始 序号,主键,自增长 */
private Long idStart; private Long idStart;
...@@ -96,18 +96,6 @@ public class AttendanceGroupFreeworkSpecialQuery extends AttendanceGroupFreework ...@@ -96,18 +96,6 @@ public class AttendanceGroupFreeworkSpecialQuery extends AttendanceGroupFreework
/** 结束 特殊时间 */ /** 结束 特殊时间 */
private String specialTimeEnd; private String specialTimeEnd;
/** 开始 时间段时候开始时间 */
private String specialTimeStartStart;
/** 结束 时间段时候开始时间 */
private String specialTimeStartEnd;
/** 开始 时间段结束时间 */
private String specialTimeEndStart;
/** 结束 时间段结束时间 */
private String specialTimeEndEnd;
/** 备注 */ /** 备注 */
private List<String> remarkList; private List<String> remarkList;
...@@ -155,6 +143,18 @@ public class AttendanceGroupFreeworkSpecialQuery extends AttendanceGroupFreework ...@@ -155,6 +143,18 @@ public class AttendanceGroupFreeworkSpecialQuery extends AttendanceGroupFreework
/** 结束 更新时间 */ /** 结束 更新时间 */
private String updateTimeEnd; private String updateTimeEnd;
/** 开始 时间段时候开始时间 */
private String specialStartTimeStart;
/** 结束 时间段时候开始时间 */
private String specialStartTimeEnd;
/** 开始 时间段结束时间 */
private String specialEndTimeStart;
/** 结束 时间段结束时间 */
private String specialEndTimeEnd;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */ /** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<AttendanceGroupFreeworkSpecialQuery> orConditionList; private List<AttendanceGroupFreeworkSpecialQuery> orConditionList;
...@@ -632,70 +632,6 @@ public class AttendanceGroupFreeworkSpecialQuery extends AttendanceGroupFreework ...@@ -632,70 +632,6 @@ public class AttendanceGroupFreeworkSpecialQuery extends AttendanceGroupFreework
this.specialTimeEnd = specialTimeEnd; this.specialTimeEnd = specialTimeEnd;
} }
/**
* 获取 开始 时间段时候开始时间
* @return specialTimeStartStart
*/
public String getSpecialTimeStartStart(){
return this.specialTimeStartStart;
}
/**
* 设置 开始 时间段时候开始时间
* @param specialTimeStartStart
*/
public void setSpecialTimeStartStart(String specialTimeStartStart){
this.specialTimeStartStart = specialTimeStartStart;
}
/**
* 获取 结束 时间段时候开始时间
* @return specialTimeStartEnd
*/
public String getSpecialTimeStartEnd(){
return this.specialTimeStartEnd;
}
/**
* 设置 结束 时间段时候开始时间
* @param specialTimeStartEnd
*/
public void setSpecialTimeStartEnd(String specialTimeStartEnd){
this.specialTimeStartEnd = specialTimeStartEnd;
}
/**
* 获取 开始 时间段结束时间
* @return specialTimeEndStart
*/
public String getSpecialTimeEndStart(){
return this.specialTimeEndStart;
}
/**
* 设置 开始 时间段结束时间
* @param specialTimeEndStart
*/
public void setSpecialTimeEndStart(String specialTimeEndStart){
this.specialTimeEndStart = specialTimeEndStart;
}
/**
* 获取 结束 时间段结束时间
* @return specialTimeEndEnd
*/
public String getSpecialTimeEndEnd(){
return this.specialTimeEndEnd;
}
/**
* 设置 结束 时间段结束时间
* @param specialTimeEndEnd
*/
public void setSpecialTimeEndEnd(String specialTimeEndEnd){
this.specialTimeEndEnd = specialTimeEndEnd;
}
/** /**
* 获取 备注 * 获取 备注
* @return remarkList * @return remarkList
...@@ -954,6 +890,70 @@ public class AttendanceGroupFreeworkSpecialQuery extends AttendanceGroupFreework ...@@ -954,6 +890,70 @@ public class AttendanceGroupFreeworkSpecialQuery extends AttendanceGroupFreework
this.updateTimeEnd = updateTimeEnd; this.updateTimeEnd = updateTimeEnd;
} }
/**
* 获取 开始 时间段时候开始时间
* @return specialStartTimeStart
*/
public String getSpecialStartTimeStart(){
return this.specialStartTimeStart;
}
/**
* 设置 开始 时间段时候开始时间
* @param specialStartTimeStart
*/
public void setSpecialStartTimeStart(String specialStartTimeStart){
this.specialStartTimeStart = specialStartTimeStart;
}
/**
* 获取 结束 时间段时候开始时间
* @return specialStartTimeEnd
*/
public String getSpecialStartTimeEnd(){
return this.specialStartTimeEnd;
}
/**
* 设置 结束 时间段时候开始时间
* @param specialStartTimeEnd
*/
public void setSpecialStartTimeEnd(String specialStartTimeEnd){
this.specialStartTimeEnd = specialStartTimeEnd;
}
/**
* 获取 开始 时间段结束时间
* @return specialEndTimeStart
*/
public String getSpecialEndTimeStart(){
return this.specialEndTimeStart;
}
/**
* 设置 开始 时间段结束时间
* @param specialEndTimeStart
*/
public void setSpecialEndTimeStart(String specialEndTimeStart){
this.specialEndTimeStart = specialEndTimeStart;
}
/**
* 获取 结束 时间段结束时间
* @return specialEndTimeEnd
*/
public String getSpecialEndTimeEnd(){
return this.specialEndTimeEnd;
}
/**
* 设置 结束 时间段结束时间
* @param specialEndTimeEnd
*/
public void setSpecialEndTimeEnd(String specialEndTimeEnd){
this.specialEndTimeEnd = specialEndTimeEnd;
}
/** /**
* 设置 序号,主键,自增长 * 设置 序号,主键,自增长
* @param id * @param id
...@@ -1245,8 +1245,6 @@ public class AttendanceGroupFreeworkSpecialQuery extends AttendanceGroupFreework ...@@ -1245,8 +1245,6 @@ public class AttendanceGroupFreeworkSpecialQuery extends AttendanceGroupFreework
/** /**
* 设置 备注 * 设置 备注
* @param remark * @param remark
...@@ -1375,6 +1373,8 @@ public class AttendanceGroupFreeworkSpecialQuery extends AttendanceGroupFreework ...@@ -1375,6 +1373,8 @@ public class AttendanceGroupFreeworkSpecialQuery extends AttendanceGroupFreework
} }
/** /**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) * 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList * @return orConditionList
......
...@@ -13,6 +13,8 @@ import com.mortals.xhx.module.attendance.service.AttendanceClassDetailService; ...@@ -13,6 +13,8 @@ import com.mortals.xhx.module.attendance.service.AttendanceClassDetailService;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import java.util.Date; import java.util.Date;
import java.util.Arrays; import java.util.Arrays;
import java.util.List;
/** /**
* AttendanceClassService * AttendanceClassService
* 考勤班次信息 service实现 * 考勤班次信息 service实现
......
...@@ -13,6 +13,8 @@ import com.mortals.xhx.module.attendance.service.AttendanceGroupFixedworkSpecial ...@@ -13,6 +13,8 @@ import com.mortals.xhx.module.attendance.service.AttendanceGroupFixedworkSpecial
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import java.util.Date; import java.util.Date;
import java.util.Arrays; import java.util.Arrays;
import java.util.List;
/** /**
* AttendanceGroupFixedworkService * AttendanceGroupFixedworkService
* 考勤组考勤固定工时 service实现 * 考勤组考勤固定工时 service实现
......
...@@ -13,6 +13,8 @@ import com.mortals.xhx.module.attendance.service.AttendanceGroupFreeworkSpecialS ...@@ -13,6 +13,8 @@ import com.mortals.xhx.module.attendance.service.AttendanceGroupFreeworkSpecialS
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import java.util.Date; import java.util.Date;
import java.util.Arrays; import java.util.Arrays;
import java.util.List;
/** /**
* AttendanceGroupFreeworkService * AttendanceGroupFreeworkService
* 考勤组考勤自由工时配置 service实现 * 考勤组考勤自由工时配置 service实现
......
...@@ -13,6 +13,8 @@ import com.mortals.xhx.module.attendance.service.AttendanceGroupStaffService; ...@@ -13,6 +13,8 @@ import com.mortals.xhx.module.attendance.service.AttendanceGroupStaffService;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import java.util.Date; import java.util.Date;
import java.util.Arrays; import java.util.Arrays;
import java.util.List;
/** /**
* AttendanceGroupService * AttendanceGroupService
* 考勤组信息 service实现 * 考勤组信息 service实现
......
...@@ -21,4 +21,9 @@ public interface DeptDao extends ICRUDDao<DeptEntity,Long>{ ...@@ -21,4 +21,9 @@ public interface DeptDao extends ICRUDDao<DeptEntity,Long>{
*/ */
List<DeptEntity> selectChildrenDeptById(String deptId); List<DeptEntity> selectChildrenDeptById(String deptId);
/**
* 查询所有数据
* */
List<DeptEntity> queryAllList();
} }
package com.mortals.xhx.module.dept.dao.ibatis; package com.mortals.xhx.module.dept.dao.ibatis;
import org.springframework.stereotype.Repository; import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import com.mortals.xhx.module.dept.dao.DeptDao; import com.mortals.xhx.module.dept.dao.DeptDao;
import com.mortals.xhx.module.dept.model.DeptEntity; import com.mortals.xhx.module.dept.model.DeptEntity;
import java.util.Date; import org.springframework.stereotype.Repository;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List; import java.util.List;
/** /**
* 部门信息DaoImpl DAO接口 * 部门信息DaoImpl DAO接口
...@@ -22,4 +22,9 @@ public class DeptDaoImpl extends BaseCRUDDaoMybatis<DeptEntity,Long> implements ...@@ -22,4 +22,9 @@ public class DeptDaoImpl extends BaseCRUDDaoMybatis<DeptEntity,Long> implements
return getSqlSession().selectList(getSqlId("selectChildrenDeptById"), deptId); return getSqlSession().selectList(getSqlId("selectChildrenDeptById"), deptId);
} }
@Override
public List<DeptEntity> queryAllList() {
return null;
}
} }
...@@ -2,7 +2,9 @@ package com.mortals.xhx.module.staff.dao; ...@@ -2,7 +2,9 @@ package com.mortals.xhx.module.staff.dao;
import com.mortals.framework.dao.ICRUDDao; import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.staff.model.StaffEntity; import com.mortals.xhx.module.staff.model.StaffEntity;
import java.util.List; import java.util.List;
/** /**
* 员工基本信息Dao * 员工基本信息Dao
* 员工基本信息 DAO接口 * 员工基本信息 DAO接口
...@@ -14,4 +16,9 @@ import java.util.List; ...@@ -14,4 +16,9 @@ import java.util.List;
public interface StaffDao extends ICRUDDao<StaffEntity,Long>{ public interface StaffDao extends ICRUDDao<StaffEntity,Long>{
/**
* 查询所有
* */
List<StaffEntity> queryAllList();
} }
package com.mortals.xhx.module.staff.dao.ibatis; package com.mortals.xhx.module.staff.dao.ibatis;
import org.springframework.stereotype.Repository; import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import com.mortals.xhx.module.staff.dao.StaffDao; import com.mortals.xhx.module.staff.dao.StaffDao;
import com.mortals.xhx.module.staff.model.StaffEntity; import com.mortals.xhx.module.staff.model.StaffEntity;
import java.util.Date; import org.springframework.stereotype.Repository;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List; import java.util.List;
/** /**
* 员工基本信息DaoImpl DAO接口 * 员工基本信息DaoImpl DAO接口
...@@ -17,5 +17,8 @@ import java.util.List; ...@@ -17,5 +17,8 @@ import java.util.List;
public class StaffDaoImpl extends BaseCRUDDaoMybatis<StaffEntity,Long> implements StaffDao { public class StaffDaoImpl extends BaseCRUDDaoMybatis<StaffEntity,Long> implements StaffDao {
@Override
public List<StaffEntity> queryAllList() {
return null;
}
} }
package com.mortals.xhx.module.staff.model; package com.mortals.xhx.module.staff.model;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.staff.model.vo.StaffVo; import com.mortals.xhx.module.staff.model.vo.StaffVo;
import java.util.Date;
/** /**
* 员工基本信息实体对象 * 员工基本信息实体对象
* *
...@@ -93,6 +89,10 @@ public class StaffEntity extends StaffVo { ...@@ -93,6 +89,10 @@ public class StaffEntity extends StaffVo {
* 备注 * 备注
*/ */
private String remark; private String remark;
/**
* 备注id
*/
private String remarkId;
/** /**
* 员工来源(1.外部,2.内部) * 员工来源(1.外部,2.内部)
*/ */
...@@ -367,6 +367,20 @@ public class StaffEntity extends StaffVo { ...@@ -367,6 +367,20 @@ public class StaffEntity extends StaffVo {
public void setRemark(String remark){ public void setRemark(String remark){
this.remark = remark; this.remark = remark;
} }
/**
* 获取 备注id
* @return String
*/
public String getRemarkId(){
return remarkId;
}
/**
* 设置 备注id
* @param remarkId
*/
public void setRemarkId(String remarkId){
this.remarkId = remarkId;
}
/** /**
* 获取 员工来源(1.外部,2.内部) * 获取 员工来源(1.外部,2.内部)
* @return Integer * @return Integer
...@@ -422,6 +436,7 @@ public class StaffEntity extends StaffVo { ...@@ -422,6 +436,7 @@ public class StaffEntity extends StaffVo {
sb.append(",regularDate:").append(getRegularDate()); sb.append(",regularDate:").append(getRegularDate());
sb.append(",leaveDate:").append(getLeaveDate()); sb.append(",leaveDate:").append(getLeaveDate());
sb.append(",remark:").append(getRemark()); sb.append(",remark:").append(getRemark());
sb.append(",remarkId:").append(getRemarkId());
sb.append(",source:").append(getSource()); sb.append(",source:").append(getSource());
return sb.toString(); return sb.toString();
} }
...@@ -466,6 +481,8 @@ public class StaffEntity extends StaffVo { ...@@ -466,6 +481,8 @@ public class StaffEntity extends StaffVo {
this.remark = ""; this.remark = "";
this.remarkId = "";
this.source = 1; this.source = 1;
} }
} }
\ No newline at end of file
package com.mortals.xhx.module.staff.model; package com.mortals.xhx.module.staff.model;
import java.util.Date;
import java.util.List; import java.util.List;
import com.mortals.xhx.module.staff.model.StaffEntity;
/** /**
* 员工基本信息查询对象 * 员工基本信息查询对象
* *
* @author zxfei * @author zxfei
* @date 2023-04-08 * @date 2023-04-10
*/ */
public class StaffQuery extends StaffEntity { public class StaffQuery extends StaffEntity {
/** 开始 序号,主键,自增长 */ /** 开始 序号,主键,自增长 */
...@@ -226,6 +224,11 @@ public class StaffQuery extends StaffEntity { ...@@ -226,6 +224,11 @@ public class StaffQuery extends StaffEntity {
/** 结束 更新时间 */ /** 结束 更新时间 */
private String updateTimeEnd; private String updateTimeEnd;
/** 备注id */
private List<String> remarkIdList;
/** 备注id排除列表 */
private List <String> remarkIdNotList;
/** 开始 员工来源(1.外部,2.内部) */ /** 开始 员工来源(1.外部,2.内部) */
private Integer sourceStart; private Integer sourceStart;
...@@ -1458,6 +1461,38 @@ public class StaffQuery extends StaffEntity { ...@@ -1458,6 +1461,38 @@ public class StaffQuery extends StaffEntity {
this.updateTimeEnd = updateTimeEnd; this.updateTimeEnd = updateTimeEnd;
} }
/**
* 获取 备注id
* @return remarkIdList
*/
public List<String> getRemarkIdList(){
return this.remarkIdList;
}
/**
* 设置 备注id
* @param remarkIdList
*/
public void setRemarkIdList(List<String> remarkIdList){
this.remarkIdList = remarkIdList;
}
/**
* 获取 备注id
* @return remarkIdNotList
*/
public List<String> getRemarkIdNotList(){
return this.remarkIdNotList;
}
/**
* 设置 备注id
* @param remarkIdNotList
*/
public void setRemarkIdNotList(List<String> remarkIdNotList){
this.remarkIdNotList = remarkIdNotList;
}
/** /**
* 获取 开始 员工来源(1.外部,2.内部) * 获取 开始 员工来源(1.外部,2.内部)
* @return sourceStart * @return sourceStart
...@@ -2202,6 +2237,25 @@ public class StaffQuery extends StaffEntity { ...@@ -2202,6 +2237,25 @@ public class StaffQuery extends StaffEntity {
} }
/**
* 设置 备注id
* @param remarkId
*/
public StaffQuery remarkId(String remarkId){
setRemarkId(remarkId);
return this;
}
/**
* 设置 备注id
* @param remarkIdList
*/
public StaffQuery remarkIdList(List<String> remarkIdList){
this.remarkIdList = remarkIdList;
return this;
}
/** /**
* 设置 员工来源(1.外部,2.内部) * 设置 员工来源(1.外部,2.内部)
* @param source * @param source
......
package com.mortals.xhx.module.staff.model.vo;
import lombok.Data;
import java.util.Date;
/**
* @author djx
* @date 2023年04月10日 14:20
*/
@Data
public class HolidayListVo {
//姓名
private String workName;
//状态
private String workStatus;
//部门
private String workDept;
//在职期限
private String workLimit;
//入职时间
private Date workBeginDay;
//转正时间
private Date workFormalDay;
//本月实际出勤天数
private String attendanceCount;
//请假天数
private String leaveCount;
//迟到早退天数
private String lateCount;
//矿工天数
private String minerCount;
//缺卡次数
private String lackCardCount;
//加班天数
private String workOverDay;
//调休
private String compensatoryDay;
//婚假
private String marriageHoliday;
//年假
private String winterHoliday;
//陪产假
private String paternityLeaveDay;
}
package com.mortals.xhx.module.staff.model.vo; package com.mortals.xhx.module.staff.model.vo;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.staff.model.StaffEntity;
import lombok.Data; import lombok.Data;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
* 员工基本信息视图对象 * 员工基本信息视图对象
...@@ -16,4 +14,5 @@ public class StaffVo extends BaseEntityLong { ...@@ -16,4 +14,5 @@ public class StaffVo extends BaseEntityLong {
private List <Long> idList; private List <Long> idList;
private List<HolidayListVo> holidayLists;
} }
\ No newline at end of file
package com.mortals.xhx.module.staff.model.vo;
import lombok.Data;
@Data
public class holidayInfoVo {
//调休
//private Integer
}
package com.mortals.xhx.module.staff.service; package com.mortals.xhx.module.staff.service;
import com.mortals.framework.service.ICRUDCacheService;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.staff.model.StaffEntity; import com.mortals.xhx.module.staff.model.StaffEntity;
/** /**
...@@ -9,6 +10,6 @@ import com.mortals.xhx.module.staff.model.StaffEntity; ...@@ -9,6 +10,6 @@ import com.mortals.xhx.module.staff.model.StaffEntity;
* @author zxfei * @author zxfei
* @date 2023-04-07 * @date 2023-04-07
*/ */
public interface StaffService extends ICRUDService<StaffEntity,Long>{ public interface StaffService extends ICRUDCacheService<StaffEntity,Long> {
} }
\ No newline at end of file
package com.mortals.xhx.module.staff.service.impl; package com.mortals.xhx.module.staff.service.impl;
import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
...@@ -6,14 +8,20 @@ import com.mortals.framework.model.Context; ...@@ -6,14 +8,20 @@ import com.mortals.framework.model.Context;
import com.mortals.xhx.module.staff.dao.StaffDao; import com.mortals.xhx.module.staff.dao.StaffDao;
import com.mortals.xhx.module.staff.model.StaffEntity; import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.service.StaffService; import com.mortals.xhx.module.staff.service.StaffService;
/** /**
* StaffService * StaffService
* 员工基本信息 service实现 * 员工基本信息 service实现
* *
* @author zxfei * @author zxfei
* @date 2023-04-07 * @date 2023-04-07
*/ */
@Service("staffService") @Service("staffService")
public class StaffServiceImpl extends AbstractCRUDServiceImpl<StaffDao, StaffEntity, Long> implements StaffService { public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, StaffEntity, Long> implements StaffService {
@Override
protected String getExtKey(StaffEntity data) {
//工号作为redis 扩展key
return data.getWorkNum();
}
} }
\ No newline at end of file
package com.mortals.xhx.module.staff.web; package com.mortals.xhx.module.staff.web;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.StatusEnum; import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.model.vo.HolidayListVo;
import com.mortals.xhx.module.staff.service.StaffService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context; import java.util.ArrayList;
import javax.servlet.http.HttpServletRequest; import java.util.Date;
import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.service.StaffService;
import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import java.util.Arrays;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*;
/** /**
* *
* 员工基本信息 * 员工基本信息
...@@ -61,4 +52,34 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ ...@@ -61,4 +52,34 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ
protected int doListAfter(StaffEntity query, Map<String, Object> model, Context context) throws AppException { protected int doListAfter(StaffEntity query, Map<String, Object> model, Context context) throws AppException {
return super.doListAfter(query, model, context); return super.doListAfter(query, model, context);
} }
@Override
protected int infoAfter(Long id, Map<String, Object> model, StaffEntity entity, Context context) throws AppException {
//todo 员工统计信息
List<HolidayListVo> holidayListVos = new ArrayList<>();
HolidayListVo vo =new HolidayListVo();
vo.setWorkName("测试");
vo.setWorkStatus("正式");
vo.setWorkDept("技术部门");
vo.setWorkLimit("1003");
vo.setWorkBeginDay(new Date(2020-03-01));
vo.setWorkFormalDay(new Date(2020-04-31));
vo.setAttendanceCount("22");
vo.setLeaveCount("2");
vo.setLateCount("1");
vo.setMinerCount("1");
vo.setLackCardCount("0");
vo.setWorkOverDay("2");
vo.setCompensatoryDay("10");
vo.setMarriageHoliday("10");
vo.setWinterHoliday("10");
vo.setPaternityLeaveDay("10");
holidayListVos.add(vo);
entity.setHolidayLists(holidayListVos);
// StaffEntity cache = this.service.getCache(entity.getWorkNum());
return super.infoAfter(id, model, entity, context);
}
} }
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd"> "mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.attendance.dao.ibatis.AttendanceGroupFixedworkDaoImpl"> <mapper namespace="com.mortals.xhx.module.attendance.dao.ibatis.AttendanceGroupFixedworkDaoImpl">
<!-- 字段和属性映射 --> <!-- 字段和属性映射 -->
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd"> "mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.attendance.dao.ibatis.AttendanceGroupFixedworkSpecialDaoImpl"> <mapper namespace="com.mortals.xhx.module.attendance.dao.ibatis.AttendanceGroupFixedworkSpecialDaoImpl">
<!-- 字段和属性映射 --> <!-- 字段和属性映射 -->
...@@ -12,13 +12,13 @@ ...@@ -12,13 +12,13 @@
<result property="className" column="className" /> <result property="className" column="className" />
<result property="addWay" column="addWay" /> <result property="addWay" column="addWay" />
<result property="specialTime" column="specialTime" /> <result property="specialTime" column="specialTime" />
<result property="specialTimeStart" column="specialTimeStart" />
<result property="specialTimeEnd" column="specialTimeEnd" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="createUserId" column="createUserId" /> <result property="createUserId" column="createUserId" />
<result property="createTime" column="createTime" /> <result property="createTime" column="createTime" />
<result property="updateUserId" column="updateUserId" /> <result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" /> <result property="updateTime" column="updateTime" />
<result property="specialStartTime" column="specialStartTime" />
<result property="specialEndTime" column="specialEndTime" />
</resultMap> </resultMap>
...@@ -47,12 +47,6 @@ ...@@ -47,12 +47,6 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('specialTime') or colPickMode == 1 and data.containsKey('specialTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('specialTime') or colPickMode == 1 and data.containsKey('specialTime')))">
a.specialTime, a.specialTime,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('specialTimeStart') or colPickMode == 1 and data.containsKey('specialTimeStart')))">
a.specialTimeStart,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('specialTimeEnd') or colPickMode == 1 and data.containsKey('specialTimeEnd')))">
a.specialTimeEnd,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('remark') or colPickMode == 1 and data.containsKey('remark')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('remark') or colPickMode == 1 and data.containsKey('remark')))">
a.remark, a.remark,
</if> </if>
...@@ -68,23 +62,29 @@ ...@@ -68,23 +62,29 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime, a.updateTime,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('specialStartTime') or colPickMode == 1 and data.containsKey('specialStartTime')))">
a.specialStartTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('specialEndTime') or colPickMode == 1 and data.containsKey('specialEndTime')))">
a.specialEndTime,
</if>
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="AttendanceGroupFixedworkSpecialEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="AttendanceGroupFixedworkSpecialEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_attendance_group_fixedwork_special insert into mortals_xhx_attendance_group_fixedwork_special
(fixedWorkId,must,classId,className,addWay,specialTime,specialTimeStart,specialTimeEnd,remark,createUserId,createTime,updateUserId,updateTime) (fixedWorkId,must,classId,className,addWay,specialTime,remark,createUserId,createTime,updateUserId,updateTime,specialStartTime,specialEndTime)
VALUES VALUES
(#{fixedWorkId},#{must},#{classId},#{className},#{addWay},#{specialTime},#{specialTimeStart},#{specialTimeEnd},#{remark},#{createUserId},#{createTime},#{updateUserId},#{updateTime}) (#{fixedWorkId},#{must},#{classId},#{className},#{addWay},#{specialTime},#{remark},#{createUserId},#{createTime},#{updateUserId},#{updateTime},#{specialStartTime},#{specialEndTime})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_attendance_group_fixedwork_special insert into mortals_xhx_attendance_group_fixedwork_special
(fixedWorkId,must,classId,className,addWay,specialTime,specialTimeStart,specialTimeEnd,remark,createUserId,createTime,updateUserId,updateTime) (fixedWorkId,must,classId,className,addWay,specialTime,remark,createUserId,createTime,updateUserId,updateTime,specialStartTime,specialEndTime)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.fixedWorkId},#{item.must},#{item.classId},#{item.className},#{item.addWay},#{item.specialTime},#{item.specialTimeStart},#{item.specialTimeEnd},#{item.remark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime}) (#{item.fixedWorkId},#{item.must},#{item.classId},#{item.className},#{item.addWay},#{item.specialTime},#{item.remark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime},#{item.specialStartTime},#{item.specialEndTime})
</foreach> </foreach>
</insert> </insert>
...@@ -124,12 +124,6 @@ ...@@ -124,12 +124,6 @@
<if test="(colPickMode==0 and data.containsKey('specialTime')) or (colPickMode==1 and !data.containsKey('specialTime'))"> <if test="(colPickMode==0 and data.containsKey('specialTime')) or (colPickMode==1 and !data.containsKey('specialTime'))">
a.specialTime=#{data.specialTime}, a.specialTime=#{data.specialTime},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('specialTimeStart')) or (colPickMode==1 and !data.containsKey('specialTimeStart'))">
a.specialTimeStart=#{data.specialTimeStart},
</if>
<if test="(colPickMode==0 and data.containsKey('specialTimeEnd')) or (colPickMode==1 and !data.containsKey('specialTimeEnd'))">
a.specialTimeEnd=#{data.specialTimeEnd},
</if>
<if test="(colPickMode==0 and data.containsKey('remark')) or (colPickMode==1 and !data.containsKey('remark'))"> <if test="(colPickMode==0 and data.containsKey('remark')) or (colPickMode==1 and !data.containsKey('remark'))">
a.remark=#{data.remark}, a.remark=#{data.remark},
</if> </if>
...@@ -151,6 +145,12 @@ ...@@ -151,6 +145,12 @@
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))"> <if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime}, a.updateTime=#{data.updateTime},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('specialStartTime')) or (colPickMode==1 and !data.containsKey('specialStartTime'))">
a.specialStartTime=#{data.specialStartTime},
</if>
<if test="(colPickMode==0 and data.containsKey('specialEndTime')) or (colPickMode==1 and !data.containsKey('specialEndTime'))">
a.specialEndTime=#{data.specialEndTime},
</if>
</trim> </trim>
<trim suffixOverrides="where" suffix=""> <trim suffixOverrides="where" suffix="">
where where
...@@ -225,20 +225,6 @@ ...@@ -225,20 +225,6 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="specialTimeStart=(case" suffix="ELSE specialTimeStart end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('specialTimeStart')) or (colPickMode==1 and !item.containsKey('specialTimeStart'))">
when a.id=#{item.id} then #{item.specialTimeStart}
</if>
</foreach>
</trim>
<trim prefix="specialTimeEnd=(case" suffix="ELSE specialTimeEnd end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('specialTimeEnd')) or (colPickMode==1 and !item.containsKey('specialTimeEnd'))">
when a.id=#{item.id} then #{item.specialTimeEnd}
</if>
</foreach>
</trim>
<trim prefix="remark=(case" suffix="ELSE remark end),"> <trim prefix="remark=(case" suffix="ELSE remark end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('remark')) or (colPickMode==1 and !item.containsKey('remark'))"> <if test="(colPickMode==0 and item.containsKey('remark')) or (colPickMode==1 and !item.containsKey('remark'))">
...@@ -284,6 +270,20 @@ ...@@ -284,6 +270,20 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="specialStartTime=(case" suffix="ELSE specialStartTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('specialStartTime')) or (colPickMode==1 and !item.containsKey('specialStartTime'))">
when a.id=#{item.id} then #{item.specialStartTime}
</if>
</foreach>
</trim>
<trim prefix="specialEndTime=(case" suffix="ELSE specialEndTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('specialEndTime')) or (colPickMode==1 and !item.containsKey('specialEndTime'))">
when a.id=#{item.id} then #{item.specialEndTime}
</if>
</foreach>
</trim>
</trim> </trim>
where id in where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")"> <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
...@@ -572,36 +572,6 @@ ...@@ -572,36 +572,6 @@
${_conditionType_} a.specialTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.specialTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') ${_conditionType_} a.specialTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.specialTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if> </if>
<if test="conditionParamRef.containsKey('specialTimeStart')">
<if test="conditionParamRef.specialTimeStart != null ">
${_conditionType_} a.specialTimeStart = #{${_conditionParam_}.specialTimeStart}
</if>
<if test="conditionParamRef.specialTimeStart == null">
${_conditionType_} a.specialTimeStart is null
</if>
</if>
<if test="conditionParamRef.containsKey('specialTimeStartStart') and conditionParamRef.specialTimeStartStart != null and conditionParamRef.specialTimeStartStart!=''">
${_conditionType_} a.specialTimeStart <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.specialTimeStartStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('specialTimeStartEnd') and conditionParamRef.specialTimeStartEnd != null and conditionParamRef.specialTimeStartEnd!=''">
${_conditionType_} a.specialTimeStart <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.specialTimeStartEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('specialTimeEnd')">
<if test="conditionParamRef.specialTimeEnd != null ">
${_conditionType_} a.specialTimeEnd = #{${_conditionParam_}.specialTimeEnd}
</if>
<if test="conditionParamRef.specialTimeEnd == null">
${_conditionType_} a.specialTimeEnd is null
</if>
</if>
<if test="conditionParamRef.containsKey('specialTimeEndStart') and conditionParamRef.specialTimeEndStart != null and conditionParamRef.specialTimeEndStart!=''">
${_conditionType_} a.specialTimeEnd <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.specialTimeEndStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('specialTimeEndEnd') and conditionParamRef.specialTimeEndEnd != null and conditionParamRef.specialTimeEndEnd!=''">
${_conditionType_} a.specialTimeEnd <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.specialTimeEndEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('remark')"> <if test="conditionParamRef.containsKey('remark')">
<if test="conditionParamRef.remark != null and conditionParamRef.remark != ''"> <if test="conditionParamRef.remark != null and conditionParamRef.remark != ''">
${_conditionType_} a.remark like #{${_conditionParam_}.remark} ${_conditionType_} a.remark like #{${_conditionParam_}.remark}
...@@ -706,6 +676,36 @@ ...@@ -706,6 +676,36 @@
<if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''"> <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') ${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if> </if>
<if test="conditionParamRef.containsKey('specialStartTime')">
<if test="conditionParamRef.specialStartTime != null ">
${_conditionType_} a.specialStartTime = #{${_conditionParam_}.specialStartTime}
</if>
<if test="conditionParamRef.specialStartTime == null">
${_conditionType_} a.specialStartTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('specialStartTimeStart') and conditionParamRef.specialStartTimeStart != null and conditionParamRef.specialStartTimeStart!=''">
${_conditionType_} a.specialStartTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.specialStartTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('specialStartTimeEnd') and conditionParamRef.specialStartTimeEnd != null and conditionParamRef.specialStartTimeEnd!=''">
${_conditionType_} a.specialStartTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.specialStartTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('specialEndTime')">
<if test="conditionParamRef.specialEndTime != null ">
${_conditionType_} a.specialEndTime = #{${_conditionParam_}.specialEndTime}
</if>
<if test="conditionParamRef.specialEndTime == null">
${_conditionType_} a.specialEndTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('specialEndTimeStart') and conditionParamRef.specialEndTimeStart != null and conditionParamRef.specialEndTimeStart!=''">
${_conditionType_} a.specialEndTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.specialEndTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('specialEndTimeEnd') and conditionParamRef.specialEndTimeEnd != null and conditionParamRef.specialEndTimeEnd!=''">
${_conditionType_} a.specialEndTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.specialEndTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
</sql> </sql>
<sql id="_orderCols_"> <sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()"> <if test="orderColList != null and !orderColList.isEmpty()">
...@@ -754,16 +754,6 @@ ...@@ -754,16 +754,6 @@
<if test='orderCol.specialTime != null and "DESC".equalsIgnoreCase(orderCol.specialTime)'>DESC</if> <if test='orderCol.specialTime != null and "DESC".equalsIgnoreCase(orderCol.specialTime)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('specialTimeStart')">
a.specialTimeStart
<if test='orderCol.specialTimeStart != null and "DESC".equalsIgnoreCase(orderCol.specialTimeStart)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('specialTimeEnd')">
a.specialTimeEnd
<if test='orderCol.specialTimeEnd != null and "DESC".equalsIgnoreCase(orderCol.specialTimeEnd)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('remark')"> <if test="orderCol.containsKey('remark')">
a.remark a.remark
<if test='orderCol.remark != null and "DESC".equalsIgnoreCase(orderCol.remark)'>DESC</if> <if test='orderCol.remark != null and "DESC".equalsIgnoreCase(orderCol.remark)'>DESC</if>
...@@ -789,6 +779,16 @@ ...@@ -789,6 +779,16 @@
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if> <if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('specialStartTime')">
a.specialStartTime
<if test='orderCol.specialStartTime != null and "DESC".equalsIgnoreCase(orderCol.specialStartTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('specialEndTime')">
a.specialEndTime
<if test='orderCol.specialEndTime != null and "DESC".equalsIgnoreCase(orderCol.specialEndTime)'>DESC</if>
,
</if>
</trim> </trim>
</if> </if>
</sql> </sql>
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd"> "mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.attendance.dao.ibatis.AttendanceGroupFreeworkDaoImpl"> <mapper namespace="com.mortals.xhx.module.attendance.dao.ibatis.AttendanceGroupFreeworkDaoImpl">
<!-- 字段和属性映射 --> <!-- 字段和属性映射 -->
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd"> "mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.attendance.dao.ibatis.AttendanceGroupFreeworkSpecialDaoImpl"> <mapper namespace="com.mortals.xhx.module.attendance.dao.ibatis.AttendanceGroupFreeworkSpecialDaoImpl">
<!-- 字段和属性映射 --> <!-- 字段和属性映射 -->
...@@ -12,13 +12,13 @@ ...@@ -12,13 +12,13 @@
<result property="className" column="className" /> <result property="className" column="className" />
<result property="addWay" column="addWay" /> <result property="addWay" column="addWay" />
<result property="specialTime" column="specialTime" /> <result property="specialTime" column="specialTime" />
<result property="specialTimeStart" column="specialTimeStart" />
<result property="specialTimeEnd" column="specialTimeEnd" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="createUserId" column="createUserId" /> <result property="createUserId" column="createUserId" />
<result property="createTime" column="createTime" /> <result property="createTime" column="createTime" />
<result property="updateUserId" column="updateUserId" /> <result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" /> <result property="updateTime" column="updateTime" />
<result property="specialStartTime" column="specialStartTime" />
<result property="specialEndTime" column="specialEndTime" />
</resultMap> </resultMap>
...@@ -47,12 +47,6 @@ ...@@ -47,12 +47,6 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('specialTime') or colPickMode == 1 and data.containsKey('specialTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('specialTime') or colPickMode == 1 and data.containsKey('specialTime')))">
a.specialTime, a.specialTime,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('specialTimeStart') or colPickMode == 1 and data.containsKey('specialTimeStart')))">
a.specialTimeStart,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('specialTimeEnd') or colPickMode == 1 and data.containsKey('specialTimeEnd')))">
a.specialTimeEnd,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('remark') or colPickMode == 1 and data.containsKey('remark')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('remark') or colPickMode == 1 and data.containsKey('remark')))">
a.remark, a.remark,
</if> </if>
...@@ -68,23 +62,29 @@ ...@@ -68,23 +62,29 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime, a.updateTime,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('specialStartTime') or colPickMode == 1 and data.containsKey('specialStartTime')))">
a.specialStartTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('specialEndTime') or colPickMode == 1 and data.containsKey('specialEndTime')))">
a.specialEndTime,
</if>
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="AttendanceGroupFreeworkSpecialEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="AttendanceGroupFreeworkSpecialEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_attendance_group_freework_special insert into mortals_xhx_attendance_group_freework_special
(freeWorkId,must,classId,className,addWay,specialTime,specialTimeStart,specialTimeEnd,remark,createUserId,createTime,updateUserId,updateTime) (freeWorkId,must,classId,className,addWay,specialTime,remark,createUserId,createTime,updateUserId,updateTime,specialStartTime,specialEndTime)
VALUES VALUES
(#{freeWorkId},#{must},#{classId},#{className},#{addWay},#{specialTime},#{specialTimeStart},#{specialTimeEnd},#{remark},#{createUserId},#{createTime},#{updateUserId},#{updateTime}) (#{freeWorkId},#{must},#{classId},#{className},#{addWay},#{specialTime},#{remark},#{createUserId},#{createTime},#{updateUserId},#{updateTime},#{specialStartTime},#{specialEndTime})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_attendance_group_freework_special insert into mortals_xhx_attendance_group_freework_special
(freeWorkId,must,classId,className,addWay,specialTime,specialTimeStart,specialTimeEnd,remark,createUserId,createTime,updateUserId,updateTime) (freeWorkId,must,classId,className,addWay,specialTime,remark,createUserId,createTime,updateUserId,updateTime,specialStartTime,specialEndTime)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.freeWorkId},#{item.must},#{item.classId},#{item.className},#{item.addWay},#{item.specialTime},#{item.specialTimeStart},#{item.specialTimeEnd},#{item.remark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime}) (#{item.freeWorkId},#{item.must},#{item.classId},#{item.className},#{item.addWay},#{item.specialTime},#{item.remark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime},#{item.specialStartTime},#{item.specialEndTime})
</foreach> </foreach>
</insert> </insert>
...@@ -124,12 +124,6 @@ ...@@ -124,12 +124,6 @@
<if test="(colPickMode==0 and data.containsKey('specialTime')) or (colPickMode==1 and !data.containsKey('specialTime'))"> <if test="(colPickMode==0 and data.containsKey('specialTime')) or (colPickMode==1 and !data.containsKey('specialTime'))">
a.specialTime=#{data.specialTime}, a.specialTime=#{data.specialTime},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('specialTimeStart')) or (colPickMode==1 and !data.containsKey('specialTimeStart'))">
a.specialTimeStart=#{data.specialTimeStart},
</if>
<if test="(colPickMode==0 and data.containsKey('specialTimeEnd')) or (colPickMode==1 and !data.containsKey('specialTimeEnd'))">
a.specialTimeEnd=#{data.specialTimeEnd},
</if>
<if test="(colPickMode==0 and data.containsKey('remark')) or (colPickMode==1 and !data.containsKey('remark'))"> <if test="(colPickMode==0 and data.containsKey('remark')) or (colPickMode==1 and !data.containsKey('remark'))">
a.remark=#{data.remark}, a.remark=#{data.remark},
</if> </if>
...@@ -151,6 +145,12 @@ ...@@ -151,6 +145,12 @@
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))"> <if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime}, a.updateTime=#{data.updateTime},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('specialStartTime')) or (colPickMode==1 and !data.containsKey('specialStartTime'))">
a.specialStartTime=#{data.specialStartTime},
</if>
<if test="(colPickMode==0 and data.containsKey('specialEndTime')) or (colPickMode==1 and !data.containsKey('specialEndTime'))">
a.specialEndTime=#{data.specialEndTime},
</if>
</trim> </trim>
<trim suffixOverrides="where" suffix=""> <trim suffixOverrides="where" suffix="">
where where
...@@ -225,20 +225,6 @@ ...@@ -225,20 +225,6 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="specialTimeStart=(case" suffix="ELSE specialTimeStart end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('specialTimeStart')) or (colPickMode==1 and !item.containsKey('specialTimeStart'))">
when a.id=#{item.id} then #{item.specialTimeStart}
</if>
</foreach>
</trim>
<trim prefix="specialTimeEnd=(case" suffix="ELSE specialTimeEnd end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('specialTimeEnd')) or (colPickMode==1 and !item.containsKey('specialTimeEnd'))">
when a.id=#{item.id} then #{item.specialTimeEnd}
</if>
</foreach>
</trim>
<trim prefix="remark=(case" suffix="ELSE remark end),"> <trim prefix="remark=(case" suffix="ELSE remark end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('remark')) or (colPickMode==1 and !item.containsKey('remark'))"> <if test="(colPickMode==0 and item.containsKey('remark')) or (colPickMode==1 and !item.containsKey('remark'))">
...@@ -284,6 +270,20 @@ ...@@ -284,6 +270,20 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="specialStartTime=(case" suffix="ELSE specialStartTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('specialStartTime')) or (colPickMode==1 and !item.containsKey('specialStartTime'))">
when a.id=#{item.id} then #{item.specialStartTime}
</if>
</foreach>
</trim>
<trim prefix="specialEndTime=(case" suffix="ELSE specialEndTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('specialEndTime')) or (colPickMode==1 and !item.containsKey('specialEndTime'))">
when a.id=#{item.id} then #{item.specialEndTime}
</if>
</foreach>
</trim>
</trim> </trim>
where id in where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")"> <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
...@@ -572,36 +572,6 @@ ...@@ -572,36 +572,6 @@
${_conditionType_} a.specialTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.specialTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') ${_conditionType_} a.specialTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.specialTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if> </if>
<if test="conditionParamRef.containsKey('specialTimeStart')">
<if test="conditionParamRef.specialTimeStart != null ">
${_conditionType_} a.specialTimeStart = #{${_conditionParam_}.specialTimeStart}
</if>
<if test="conditionParamRef.specialTimeStart == null">
${_conditionType_} a.specialTimeStart is null
</if>
</if>
<if test="conditionParamRef.containsKey('specialTimeStartStart') and conditionParamRef.specialTimeStartStart != null and conditionParamRef.specialTimeStartStart!=''">
${_conditionType_} a.specialTimeStart <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.specialTimeStartStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('specialTimeStartEnd') and conditionParamRef.specialTimeStartEnd != null and conditionParamRef.specialTimeStartEnd!=''">
${_conditionType_} a.specialTimeStart <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.specialTimeStartEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('specialTimeEnd')">
<if test="conditionParamRef.specialTimeEnd != null ">
${_conditionType_} a.specialTimeEnd = #{${_conditionParam_}.specialTimeEnd}
</if>
<if test="conditionParamRef.specialTimeEnd == null">
${_conditionType_} a.specialTimeEnd is null
</if>
</if>
<if test="conditionParamRef.containsKey('specialTimeEndStart') and conditionParamRef.specialTimeEndStart != null and conditionParamRef.specialTimeEndStart!=''">
${_conditionType_} a.specialTimeEnd <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.specialTimeEndStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('specialTimeEndEnd') and conditionParamRef.specialTimeEndEnd != null and conditionParamRef.specialTimeEndEnd!=''">
${_conditionType_} a.specialTimeEnd <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.specialTimeEndEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('remark')"> <if test="conditionParamRef.containsKey('remark')">
<if test="conditionParamRef.remark != null and conditionParamRef.remark != ''"> <if test="conditionParamRef.remark != null and conditionParamRef.remark != ''">
${_conditionType_} a.remark like #{${_conditionParam_}.remark} ${_conditionType_} a.remark like #{${_conditionParam_}.remark}
...@@ -706,6 +676,36 @@ ...@@ -706,6 +676,36 @@
<if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''"> <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') ${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if> </if>
<if test="conditionParamRef.containsKey('specialStartTime')">
<if test="conditionParamRef.specialStartTime != null ">
${_conditionType_} a.specialStartTime = #{${_conditionParam_}.specialStartTime}
</if>
<if test="conditionParamRef.specialStartTime == null">
${_conditionType_} a.specialStartTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('specialStartTimeStart') and conditionParamRef.specialStartTimeStart != null and conditionParamRef.specialStartTimeStart!=''">
${_conditionType_} a.specialStartTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.specialStartTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('specialStartTimeEnd') and conditionParamRef.specialStartTimeEnd != null and conditionParamRef.specialStartTimeEnd!=''">
${_conditionType_} a.specialStartTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.specialStartTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('specialEndTime')">
<if test="conditionParamRef.specialEndTime != null ">
${_conditionType_} a.specialEndTime = #{${_conditionParam_}.specialEndTime}
</if>
<if test="conditionParamRef.specialEndTime == null">
${_conditionType_} a.specialEndTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('specialEndTimeStart') and conditionParamRef.specialEndTimeStart != null and conditionParamRef.specialEndTimeStart!=''">
${_conditionType_} a.specialEndTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.specialEndTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('specialEndTimeEnd') and conditionParamRef.specialEndTimeEnd != null and conditionParamRef.specialEndTimeEnd!=''">
${_conditionType_} a.specialEndTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.specialEndTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
</sql> </sql>
<sql id="_orderCols_"> <sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()"> <if test="orderColList != null and !orderColList.isEmpty()">
...@@ -754,16 +754,6 @@ ...@@ -754,16 +754,6 @@
<if test='orderCol.specialTime != null and "DESC".equalsIgnoreCase(orderCol.specialTime)'>DESC</if> <if test='orderCol.specialTime != null and "DESC".equalsIgnoreCase(orderCol.specialTime)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('specialTimeStart')">
a.specialTimeStart
<if test='orderCol.specialTimeStart != null and "DESC".equalsIgnoreCase(orderCol.specialTimeStart)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('specialTimeEnd')">
a.specialTimeEnd
<if test='orderCol.specialTimeEnd != null and "DESC".equalsIgnoreCase(orderCol.specialTimeEnd)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('remark')"> <if test="orderCol.containsKey('remark')">
a.remark a.remark
<if test='orderCol.remark != null and "DESC".equalsIgnoreCase(orderCol.remark)'>DESC</if> <if test='orderCol.remark != null and "DESC".equalsIgnoreCase(orderCol.remark)'>DESC</if>
...@@ -789,6 +779,16 @@ ...@@ -789,6 +779,16 @@
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if> <if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('specialStartTime')">
a.specialStartTime
<if test='orderCol.specialStartTime != null and "DESC".equalsIgnoreCase(orderCol.specialStartTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('specialEndTime')">
a.specialEndTime
<if test='orderCol.specialEndTime != null and "DESC".equalsIgnoreCase(orderCol.specialEndTime)'>DESC</if>
,
</if>
</trim> </trim>
</if> </if>
</sql> </sql>
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
<result property="createTime" column="createTime" /> <result property="createTime" column="createTime" />
<result property="updateUserId" column="updateUserId" /> <result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" /> <result property="updateTime" column="updateTime" />
<result property="remarkId" column="remarkId" />
<result property="source" column="source" /> <result property="source" column="source" />
</resultMap> </resultMap>
...@@ -109,6 +110,9 @@ ...@@ -109,6 +110,9 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime, a.updateTime,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('remarkId') or colPickMode == 1 and data.containsKey('remarkId')))">
a.remarkId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('source') or colPickMode == 1 and data.containsKey('source')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('source') or colPickMode == 1 and data.containsKey('source')))">
a.source, a.source,
</if> </if>
...@@ -117,18 +121,18 @@ ...@@ -117,18 +121,18 @@
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="StaffEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="StaffEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_staff insert into mortals_xhx_staff
(name,gender,birthday,photoPath,phoneNumber,idCard,workNum,politicalstatus,deptId,deptName,positionId,positionName,staffType,status,registerPath,entryDate,regularDate,leaveDate,remark,createUserId,createTime,updateUserId,updateTime,source) (name,gender,birthday,photoPath,phoneNumber,idCard,workNum,politicalstatus,deptId,deptName,positionId,positionName,staffType,status,registerPath,entryDate,regularDate,leaveDate,remark,createUserId,createTime,updateUserId,updateTime,remarkId,source)
VALUES VALUES
(#{name},#{gender},#{birthday},#{photoPath},#{phoneNumber},#{idCard},#{workNum},#{politicalstatus},#{deptId},#{deptName},#{positionId},#{positionName},#{staffType},#{status},#{registerPath},#{entryDate},#{regularDate},#{leaveDate},#{remark},#{createUserId},#{createTime},#{updateUserId},#{updateTime},#{source}) (#{name},#{gender},#{birthday},#{photoPath},#{phoneNumber},#{idCard},#{workNum},#{politicalstatus},#{deptId},#{deptName},#{positionId},#{positionName},#{staffType},#{status},#{registerPath},#{entryDate},#{regularDate},#{leaveDate},#{remark},#{createUserId},#{createTime},#{updateUserId},#{updateTime},#{remarkId},#{source})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_staff insert into mortals_xhx_staff
(name,gender,birthday,photoPath,phoneNumber,idCard,workNum,politicalstatus,deptId,deptName,positionId,positionName,staffType,status,registerPath,entryDate,regularDate,leaveDate,remark,createUserId,createTime,updateUserId,updateTime,source) (name,gender,birthday,photoPath,phoneNumber,idCard,workNum,politicalstatus,deptId,deptName,positionId,positionName,staffType,status,registerPath,entryDate,regularDate,leaveDate,remark,createUserId,createTime,updateUserId,updateTime,remarkId,source)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.name},#{item.gender},#{item.birthday},#{item.photoPath},#{item.phoneNumber},#{item.idCard},#{item.workNum},#{item.politicalstatus},#{item.deptId},#{item.deptName},#{item.positionId},#{item.positionName},#{item.staffType},#{item.status},#{item.registerPath},#{item.entryDate},#{item.regularDate},#{item.leaveDate},#{item.remark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime},#{item.source}) (#{item.name},#{item.gender},#{item.birthday},#{item.photoPath},#{item.phoneNumber},#{item.idCard},#{item.workNum},#{item.politicalstatus},#{item.deptId},#{item.deptName},#{item.positionId},#{item.positionName},#{item.staffType},#{item.status},#{item.registerPath},#{item.entryDate},#{item.regularDate},#{item.leaveDate},#{item.remark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime},#{item.remarkId},#{item.source})
</foreach> </foreach>
</insert> </insert>
...@@ -231,6 +235,9 @@ ...@@ -231,6 +235,9 @@
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))"> <if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime}, a.updateTime=#{data.updateTime},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('remarkId')) or (colPickMode==1 and !data.containsKey('remarkId'))">
a.remarkId=#{data.remarkId},
</if>
<if test="(colPickMode==0 and data.containsKey('source')) or (colPickMode==1 and !data.containsKey('source'))"> <if test="(colPickMode==0 and data.containsKey('source')) or (colPickMode==1 and !data.containsKey('source'))">
a.source=#{data.source}, a.source=#{data.source},
</if> </if>
...@@ -450,6 +457,13 @@ ...@@ -450,6 +457,13 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="remarkId=(case" suffix="ELSE remarkId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('remarkId')) or (colPickMode==1 and !item.containsKey('remarkId'))">
when a.id=#{item.id} then #{item.remarkId}
</if>
</foreach>
</trim>
<trim prefix="source=(case" suffix="ELSE source end),"> <trim prefix="source=(case" suffix="ELSE source end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<choose> <choose>
...@@ -1100,6 +1114,27 @@ ...@@ -1100,6 +1114,27 @@
<if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''"> <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') ${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if> </if>
<if test="conditionParamRef.containsKey('remarkId')">
<if test="conditionParamRef.remarkId != null and conditionParamRef.remarkId != ''">
${_conditionType_} a.remarkId like #{${_conditionParam_}.remarkId}
</if>
<if test="conditionParamRef.remarkId == null">
${_conditionType_} a.remarkId is null
</if>
</if>
<if test="conditionParamRef.containsKey('remarkIdList')">
${_conditionType_} a.remarkId in
<foreach collection="conditionParamRef.remarkIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('remarkIdNotList')">
${_conditionType_} a.remarkId not in
<foreach collection="conditionParamRef.remarkIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('source')"> <if test="conditionParamRef.containsKey('source')">
<if test="conditionParamRef.source != null "> <if test="conditionParamRef.source != null ">
${_conditionType_} a.source = #{${_conditionParam_}.source} ${_conditionType_} a.source = #{${_conditionParam_}.source}
...@@ -1260,6 +1295,11 @@ ...@@ -1260,6 +1295,11 @@
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if> <if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('remarkId')">
a.remarkId
<if test='orderCol.remarkId != null and "DESC".equalsIgnoreCase(orderCol.remarkId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('source')"> <if test="orderCol.containsKey('source')">
a.source a.source
<if test='orderCol.source != null and "DESC".equalsIgnoreCase(orderCol.source)'>DESC</if> <if test='orderCol.source != null and "DESC".equalsIgnoreCase(orderCol.source)'>DESC</if>
......
...@@ -56,10 +56,11 @@ client.global.set("Staff_id", JSON.parse(response.body).data.id); ...@@ -56,10 +56,11 @@ client.global.set("Staff_id", JSON.parse(response.body).data.id);
%} %}
###员工基本信息查看 ###员工基本信息查看
GET {{baseUrl}}/staff/info?id={{Staff_id}} GET {{baseUrl}}/staff/info?id=1
Authorization: {{authToken}} Authorization: {{authToken}}
Accept: application/json Accept: application/json
###员工基本信息编辑 ###员工基本信息编辑
GET {{baseUrl}}/staff/edit?id={{Staff_id}} GET {{baseUrl}}/staff/edit?id={{Staff_id}}
Authorization: {{authToken}} Authorization: {{authToken}}
......
...@@ -14,9 +14,16 @@ INSERT INTO `mortals_xhx_resource` VALUES (null, '员工基本信息-菜单管 ...@@ -14,9 +14,16 @@ INSERT INTO `mortals_xhx_resource` VALUES (null, '员工基本信息-菜单管
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_param` VALUES (null, '性别', 'Staff', 'gender', '1', '男', 1, 4, 0, 'gender', NULL, NULL, NULL); INSERT INTO `mortals_xhx_param` VALUES (null, '性别', 'Staff', 'gender', '1', '男', 1, 4, 0, 'gender', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '性别', 'Staff', 'gender', '2', '女', 1, 4, 0, 'gender', NULL, NULL, NULL); INSERT INTO `mortals_xhx_param` VALUES (null, '性别', 'Staff', 'gender', '2', '女', 1, 4, 0, 'gender', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '政治面貌 ', 'Staff', 'politicalstatus', '1', '中共党员', 1, 4, 0, 'politicalstatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '政治面貌 ', 'Staff', 'politicalstatus', '2', '中共预备党员', 1, 4, 0, 'politicalstatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '政治面貌 ', 'Staff', 'politicalstatus', '3', '共青团员', 1, 4, 0, 'politicalstatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '政治面貌 ', 'Staff', 'politicalstatus', '4', '群众', 1, 4, 0, 'politicalstatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '政治面貌 ', 'Staff', 'politicalstatus', '5', '其它', 1, 4, 0, 'politicalstatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '员工状态', 'Staff', 'status', '1', '正式', 1, 4, 0, 'status', NULL, NULL, NULL); INSERT INTO `mortals_xhx_param` VALUES (null, '员工状态', 'Staff', 'status', '1', '正式', 1, 4, 0, 'status', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '员工状态', 'Staff', 'status', '2', '试用', 1, 4, 0, 'status', NULL, NULL, NULL); INSERT INTO `mortals_xhx_param` VALUES (null, '员工状态', 'Staff', 'status', '2', '试用', 1, 4, 0, 'status', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '员工状态', 'Staff', 'status', '3', '离职', 1, 4, 0, 'status', NULL, NULL, NULL); INSERT INTO `mortals_xhx_param` VALUES (null, '员工状态', 'Staff', 'status', '3', '离职', 1, 4, 0, 'status', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '员工来源', 'Staff', 'source', '1', '外部', 1, 4, 0, 'source', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '员工来源', 'Staff', 'source', '2', '内部', 1, 4, 0, 'source', NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- 员工关怀信息菜单 SQL -- 员工关怀信息菜单 SQL
-- ---------------------------- -- ----------------------------
......
...@@ -50,12 +50,14 @@ CREATE TABLE mortals_xhx_staff( ...@@ -50,12 +50,14 @@ CREATE TABLE mortals_xhx_staff(
`createTime` datetime NOT NULL COMMENT '创建时间', `createTime` datetime NOT NULL COMMENT '创建时间',
`updateUserId` bigint(20) COMMENT '更新用户', `updateUserId` bigint(20) COMMENT '更新用户',
`updateTime` datetime COMMENT '更新时间', `updateTime` datetime COMMENT '更新时间',
`remarkId` varchar(255) COMMENT '备注id',
`source` tinyint(2) DEFAULT '1' COMMENT '员工来源(1.外部,2.内部)', `source` tinyint(2) DEFAULT '1' COMMENT '员工来源(1.外部,2.内部)',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='员工基本信息'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='员工基本信息';
-- ---------------------------- -- ----------------------------
-- 员工关怀信息表 -- 员工关怀信息表
-- ---------------------------- -- ----------------------------
...@@ -569,16 +571,19 @@ CREATE TABLE mortals_xhx_attendance_group_freework_special( ...@@ -569,16 +571,19 @@ CREATE TABLE mortals_xhx_attendance_group_freework_special(
`className` varchar(128) COMMENT '班次名称', `className` varchar(128) COMMENT '班次名称',
`addWay` tinyint(1) DEFAULT '0' COMMENT '无需打卡的日期类型(0.单个日期,1.时间段)', `addWay` tinyint(1) DEFAULT '0' COMMENT '无需打卡的日期类型(0.单个日期,1.时间段)',
`specialTime` datetime NOT NULL COMMENT '特殊时间', `specialTime` datetime NOT NULL COMMENT '特殊时间',
`specialTimeStart` datetime NOT NULL COMMENT '时间段时候开始时间', `specialStartTime` datetime NOT NULL COMMENT '时间段时候开始时间',
`specialTimeEnd` datetime NOT NULL COMMENT '时间段结束时间', `specialEndTime` datetime NOT NULL COMMENT '时间段结束时间',
`remark` varchar(255) COMMENT '备注', `remark` varchar(255) COMMENT '备注',
`createUserId` bigint(20) NOT NULL COMMENT '创建用户', `createUserId` bigint(20) NOT NULL COMMENT '创建用户',
`createTime` datetime NOT NULL COMMENT '创建时间', `createTime` datetime NOT NULL COMMENT '创建时间',
`updateUserId` bigint(20) COMMENT '更新用户', `updateUserId` bigint(20) COMMENT '更新用户',
`updateTime` datetime COMMENT '更新时间', `updateTime` datetime COMMENT '更新时间',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='考勤组考勤自由工时特殊日期配置'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='考勤组考勤自由工时特殊日期配置';
-- ---------------------------- -- ----------------------------
-- 考勤组考勤自由工时配置表 -- 考勤组考勤自由工时配置表
-- ---------------------------- -- ----------------------------
...@@ -616,8 +621,8 @@ CREATE TABLE mortals_xhx_attendance_group_fixedwork_special( ...@@ -616,8 +621,8 @@ CREATE TABLE mortals_xhx_attendance_group_fixedwork_special(
`className` varchar(128) COMMENT '班次名称', `className` varchar(128) COMMENT '班次名称',
`addWay` tinyint(1) DEFAULT '0' COMMENT '无需打卡的日期类型(0.单个日期,1.时间段)', `addWay` tinyint(1) DEFAULT '0' COMMENT '无需打卡的日期类型(0.单个日期,1.时间段)',
`specialTime` datetime NOT NULL COMMENT '特殊时间', `specialTime` datetime NOT NULL COMMENT '特殊时间',
`specialTimeStart` datetime NOT NULL COMMENT '时间段时候开始时间', `specialStartTime` datetime NOT NULL COMMENT '时间段时候开始时间',
`specialTimeEnd` datetime NOT NULL COMMENT '时间段结束时间', `specialEndTime` datetime NOT NULL COMMENT '时间段结束时间',
`remark` varchar(255) COMMENT '备注', `remark` varchar(255) COMMENT '备注',
`createUserId` bigint(20) NOT NULL COMMENT '创建用户', `createUserId` bigint(20) NOT NULL COMMENT '创建用户',
`createTime` datetime NOT NULL COMMENT '创建时间', `createTime` datetime NOT NULL COMMENT '创建时间',
...@@ -626,6 +631,8 @@ CREATE TABLE mortals_xhx_attendance_group_fixedwork_special( ...@@ -626,6 +631,8 @@ CREATE TABLE mortals_xhx_attendance_group_fixedwork_special(
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='考勤组考勤固定班制特殊日期配置'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='考勤组考勤固定班制特殊日期配置';
-- ---------------------------- -- ----------------------------
-- 考勤组考勤固定工时表 -- 考勤组考勤固定工时表
-- ---------------------------- -- ----------------------------
......
...@@ -8576,13 +8576,13 @@ data|object|数据对象 ...@@ -8576,13 +8576,13 @@ data|object|数据对象
&emsp;&emsp;className|String|班次名称 &emsp;&emsp;className|String|班次名称
&emsp;&emsp;addWay|Integer|无需打卡的日期类型(0.单个日期,1.时间段) &emsp;&emsp;addWay|Integer|无需打卡的日期类型(0.单个日期,1.时间段)
&emsp;&emsp;specialTime|Date|特殊时间 &emsp;&emsp;specialTime|Date|特殊时间
&emsp;&emsp;specialTimeStart|Date|时间段时候开始时间
&emsp;&emsp;specialTimeEnd|Date|时间段结束时间
&emsp;&emsp;remark|String|备注 &emsp;&emsp;remark|String|备注
&emsp;&emsp;createUserId|Long|创建用户 &emsp;&emsp;createUserId|Long|创建用户
&emsp;&emsp;createTime|Date|创建时间 &emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;updateUserId|Long|更新用户 &emsp;&emsp;updateUserId|Long|更新用户
&emsp;&emsp;updateTime|Date|更新时间 &emsp;&emsp;updateTime|Date|更新时间
&emsp;&emsp;specialStartTime|Date|时间段时候开始时间
&emsp;&emsp;specialEndTime|Date|时间段结束时间
dict|object|字典对象 dict|object|字典对象
&emsp;must|object|字典属性对象,详见附录 &emsp;must|object|字典属性对象,详见附录
&emsp;addWay|object|字典属性对象,详见附录 &emsp;addWay|object|字典属性对象,详见附录
...@@ -8630,13 +8630,13 @@ data|object|数据对象 ...@@ -8630,13 +8630,13 @@ data|object|数据对象
&emsp;className|String|班次名称 &emsp;className|String|班次名称
&emsp;addWay|Integer|无需打卡的日期类型(0.单个日期,1.时间段) &emsp;addWay|Integer|无需打卡的日期类型(0.单个日期,1.时间段)
&emsp;specialTime|Date|特殊时间 &emsp;specialTime|Date|特殊时间
&emsp;specialTimeStart|Date|时间段时候开始时间
&emsp;specialTimeEnd|Date|时间段结束时间
&emsp;remark|String|备注 &emsp;remark|String|备注
&emsp;createUserId|Long|创建用户 &emsp;createUserId|Long|创建用户
&emsp;createTime|Date|创建时间 &emsp;createTime|Date|创建时间
&emsp;updateUserId|Long|更新用户 &emsp;updateUserId|Long|更新用户
&emsp;updateTime|Date|更新时间 &emsp;updateTime|Date|更新时间
&emsp;specialStartTime|Date|时间段时候开始时间
&emsp;specialEndTime|Date|时间段结束时间
dict|object|字典对象 dict|object|字典对象
&emsp;must|object|字典属性对象,详见附录 &emsp;must|object|字典属性对象,详见附录
&emsp;addWay|object|字典属性对象,详见附录 &emsp;addWay|object|字典属性对象,详见附录
...@@ -8646,20 +8646,20 @@ dict|object|字典对象 ...@@ -8646,20 +8646,20 @@ dict|object|字典对象
{ {
"code": 1, "code": 1,
"data": { "data": {
"id":5248, "id":5076,
"freeWorkId":9666, "freeWorkId":7022,
"must":3613, "must":2824,
"classId":2609, "classId":1549,
"className":"ngw8u1", "className":"nddun6",
"addWay":6162, "addWay":9326,
"specialTime":"2023-04-08", "specialTime":"2023-04-10",
"specialTimeStart":"2023-04-08", "remark":"gfccxk",
"specialTimeEnd":"2023-04-08", "createUserId":1207,
"remark":"jz8f50", "createTime":"2023-04-10",
"createUserId":5403, "updateUserId":480,
"createTime":"2023-04-08", "updateTime":"2023-04-10",
"updateUserId":5469, "specialStartTime":"2023-04-10",
"updateTime":"2023-04-08" "specialEndTime":"2023-04-10"
} }
} }
``` ```
...@@ -8684,22 +8684,22 @@ classId|Long|否|班次ID ...@@ -8684,22 +8684,22 @@ classId|Long|否|班次ID
className|String|否|班次名称 className|String|否|班次名称
addWay|Integer|否|无需打卡的日期类型(0.单个日期,1.时间段) addWay|Integer|否|无需打卡的日期类型(0.单个日期,1.时间段)
specialTime|Date|是|特殊时间 specialTime|Date|是|特殊时间
specialTimeStart|Date|是|时间段时候开始时间
specialTimeEnd|Date|是|时间段结束时间
remark|String|否|备注 remark|String|否|备注
specialStartTime|Date|是|时间段时候开始时间
specialEndTime|Date|是|时间段结束时间
**请求样例:** **请求样例:**
``` ```
{ {
"freeWorkId":1675, "freeWorkId":6139,
"must":5147, "must":8249,
"classId":7952, "classId":2953,
"className":"e0jfo6", "className":"oh2and",
"addWay":2694, "addWay":82,
"specialTime":"2023-04-08", "specialTime":"2023-04-10",
"specialTimeStart":"2023-04-08", "remark":"ypalu8",
"specialTimeEnd":"2023-04-08", "specialStartTime":"2023-04-10",
"remark":"9tfxpf", "specialEndTime":"2023-04-10"
} }
``` ```
...@@ -8719,13 +8719,13 @@ data|object|数据对象 ...@@ -8719,13 +8719,13 @@ data|object|数据对象
&emsp;&emsp;className|String|班次名称 &emsp;&emsp;className|String|班次名称
&emsp;&emsp;addWay|Integer|无需打卡的日期类型(0.单个日期,1.时间段) &emsp;&emsp;addWay|Integer|无需打卡的日期类型(0.单个日期,1.时间段)
&emsp;&emsp;specialTime|Date|特殊时间 &emsp;&emsp;specialTime|Date|特殊时间
&emsp;&emsp;specialTimeStart|Date|时间段时候开始时间
&emsp;&emsp;specialTimeEnd|Date|时间段结束时间
&emsp;&emsp;remark|String|备注 &emsp;&emsp;remark|String|备注
&emsp;&emsp;createUserId|Long|创建用户 &emsp;&emsp;createUserId|Long|创建用户
&emsp;&emsp;createTime|Date|创建时间 &emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;updateUserId|Long|更新用户 &emsp;&emsp;updateUserId|Long|更新用户
&emsp;&emsp;updateTime|Date|更新时间 &emsp;&emsp;updateTime|Date|更新时间
&emsp;&emsp;specialStartTime|Date|时间段时候开始时间
&emsp;&emsp;specialEndTime|Date|时间段结束时间
**响应消息样例:** **响应消息样例:**
``` ```
...@@ -9092,13 +9092,13 @@ data|object|数据对象 ...@@ -9092,13 +9092,13 @@ data|object|数据对象
&emsp;&emsp;className|String|班次名称 &emsp;&emsp;className|String|班次名称
&emsp;&emsp;addWay|Integer|无需打卡的日期类型(0.单个日期,1.时间段) &emsp;&emsp;addWay|Integer|无需打卡的日期类型(0.单个日期,1.时间段)
&emsp;&emsp;specialTime|Date|特殊时间 &emsp;&emsp;specialTime|Date|特殊时间
&emsp;&emsp;specialTimeStart|Date|时间段时候开始时间
&emsp;&emsp;specialTimeEnd|Date|时间段结束时间
&emsp;&emsp;remark|String|备注 &emsp;&emsp;remark|String|备注
&emsp;&emsp;createUserId|Long|创建用户 &emsp;&emsp;createUserId|Long|创建用户
&emsp;&emsp;createTime|Date|创建时间 &emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;updateUserId|Long|更新用户 &emsp;&emsp;updateUserId|Long|更新用户
&emsp;&emsp;updateTime|Date|更新时间 &emsp;&emsp;updateTime|Date|更新时间
&emsp;&emsp;specialStartTime|Date|时间段时候开始时间
&emsp;&emsp;specialEndTime|Date|时间段结束时间
dict|object|字典对象 dict|object|字典对象
&emsp;must|object|字典属性对象,详见附录 &emsp;must|object|字典属性对象,详见附录
&emsp;addWay|object|字典属性对象,详见附录 &emsp;addWay|object|字典属性对象,详见附录
...@@ -9146,13 +9146,13 @@ data|object|数据对象 ...@@ -9146,13 +9146,13 @@ data|object|数据对象
&emsp;className|String|班次名称 &emsp;className|String|班次名称
&emsp;addWay|Integer|无需打卡的日期类型(0.单个日期,1.时间段) &emsp;addWay|Integer|无需打卡的日期类型(0.单个日期,1.时间段)
&emsp;specialTime|Date|特殊时间 &emsp;specialTime|Date|特殊时间
&emsp;specialTimeStart|Date|时间段时候开始时间
&emsp;specialTimeEnd|Date|时间段结束时间
&emsp;remark|String|备注 &emsp;remark|String|备注
&emsp;createUserId|Long|创建用户 &emsp;createUserId|Long|创建用户
&emsp;createTime|Date|创建时间 &emsp;createTime|Date|创建时间
&emsp;updateUserId|Long|更新用户 &emsp;updateUserId|Long|更新用户
&emsp;updateTime|Date|更新时间 &emsp;updateTime|Date|更新时间
&emsp;specialStartTime|Date|时间段时候开始时间
&emsp;specialEndTime|Date|时间段结束时间
dict|object|字典对象 dict|object|字典对象
&emsp;must|object|字典属性对象,详见附录 &emsp;must|object|字典属性对象,详见附录
&emsp;addWay|object|字典属性对象,详见附录 &emsp;addWay|object|字典属性对象,详见附录
...@@ -9162,20 +9162,20 @@ dict|object|字典对象 ...@@ -9162,20 +9162,20 @@ dict|object|字典对象
{ {
"code": 1, "code": 1,
"data": { "data": {
"id":8015, "id":7924,
"fixedWorkId":2972, "fixedWorkId":1115,
"must":3802, "must":8070,
"classId":5674, "classId":8139,
"className":"53zlul", "className":"3c4hgu",
"addWay":4124, "addWay":1203,
"specialTime":"2023-04-08", "specialTime":"2023-04-10",
"specialTimeStart":"2023-04-08", "remark":"w614hb",
"specialTimeEnd":"2023-04-08", "createUserId":4288,
"remark":"0rfxq5", "createTime":"2023-04-10",
"createUserId":8082, "updateUserId":6736,
"createTime":"2023-04-08", "updateTime":"2023-04-10",
"updateUserId":2828, "specialStartTime":"2023-04-10",
"updateTime":"2023-04-08" "specialEndTime":"2023-04-10"
} }
} }
``` ```
...@@ -9200,22 +9200,22 @@ classId|Long|否|班次ID ...@@ -9200,22 +9200,22 @@ classId|Long|否|班次ID
className|String|否|班次名称 className|String|否|班次名称
addWay|Integer|否|无需打卡的日期类型(0.单个日期,1.时间段) addWay|Integer|否|无需打卡的日期类型(0.单个日期,1.时间段)
specialTime|Date|是|特殊时间 specialTime|Date|是|特殊时间
specialTimeStart|Date|是|时间段时候开始时间
specialTimeEnd|Date|是|时间段结束时间
remark|String|否|备注 remark|String|否|备注
specialStartTime|Date|是|时间段时候开始时间
specialEndTime|Date|是|时间段结束时间
**请求样例:** **请求样例:**
``` ```
{ {
"fixedWorkId":8982, "fixedWorkId":9498,
"must":7809, "must":2219,
"classId":1902, "classId":5994,
"className":"72xrq3", "className":"0a7u6p",
"addWay":6684, "addWay":3443,
"specialTime":"2023-04-08", "specialTime":"2023-04-10",
"specialTimeStart":"2023-04-08", "remark":"takndm",
"specialTimeEnd":"2023-04-08", "specialStartTime":"2023-04-10",
"remark":"th3m5f", "specialEndTime":"2023-04-10"
} }
``` ```
...@@ -9235,13 +9235,13 @@ data|object|数据对象 ...@@ -9235,13 +9235,13 @@ data|object|数据对象
&emsp;&emsp;className|String|班次名称 &emsp;&emsp;className|String|班次名称
&emsp;&emsp;addWay|Integer|无需打卡的日期类型(0.单个日期,1.时间段) &emsp;&emsp;addWay|Integer|无需打卡的日期类型(0.单个日期,1.时间段)
&emsp;&emsp;specialTime|Date|特殊时间 &emsp;&emsp;specialTime|Date|特殊时间
&emsp;&emsp;specialTimeStart|Date|时间段时候开始时间
&emsp;&emsp;specialTimeEnd|Date|时间段结束时间
&emsp;&emsp;remark|String|备注 &emsp;&emsp;remark|String|备注
&emsp;&emsp;createUserId|Long|创建用户 &emsp;&emsp;createUserId|Long|创建用户
&emsp;&emsp;createTime|Date|创建时间 &emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;updateUserId|Long|更新用户 &emsp;&emsp;updateUserId|Long|更新用户
&emsp;&emsp;updateTime|Date|更新时间 &emsp;&emsp;updateTime|Date|更新时间
&emsp;&emsp;specialStartTime|Date|时间段时候开始时间
&emsp;&emsp;specialEndTime|Date|时间段结束时间
**响应消息样例:** **响应消息样例:**
``` ```
......
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