Commit 98d7c875 authored by dll's avatar dll

提交 4-11 接口未对

parents 563a7146 79aa82eb
......@@ -58,6 +58,7 @@ export default {
this.tableData = this.beforeRender(
Object.assign({}, this.tableData, data)
)
console.log(this.tableData,'')
this.afterRender(this.tableData);
})
.catch(error => {
......@@ -70,7 +71,6 @@ export default {
this.tableData.loading = false;
}, 300);
})
},
// 复制一个数组或对象
util_copy(data) {
......
......@@ -30,12 +30,15 @@ export default {
<span>
<i style="font-size:16px;color:#409EFF" class={data.icon}></i>
<span style="padding-left: 2px;font-size:14px">{node.label}</span>
<span style="padding-left: 2px;font-size:14px;margin-left:20px">
({data.children.length})
</span>
</span>
);
},
async loadNode(node, resolve) {
console.log(node)
if (node.level === 0) {
return;
}
......@@ -52,7 +55,7 @@ export default {
let node = this.$refs.areaTree.getNode(this.currentNode.id); // 通过节点id找到对应树节点对象
node.loaded = false;
node.expand(); // 主动调用展开节点方法,重新查询该节点下的所有子节点
this.toView(this.currentNode);
this.toView(this.currentNode);
},
},
......
export const timestampToTime = (timestamp) => {
// 时间戳为10位需*1000,时间戳为13位不需乘1000
var date = new Date(timestamp * 1000);
var date = null
if(timestamp.length<13){
date= new Date(timestamp * 1000);
}else{
date= new Date(timestamp);
}
var Y = date.getFullYear() + "-";
var M =
(date.getMonth() + 1 < 10
......
......@@ -9,7 +9,6 @@
<el-input-number :disabled='disabled' v-model="field" size="small" :placeholder='placeholder' @change="emit" @input="emit" v-if='type === "num"'></el-input-number>
<el-input :disabled='disabled' :placeholder='placeholder' v-model="field" @change="emit" :rows='rows' @input="emit" v-if='type === "textarea"' type='textarea' :autosize="textareaSize" :class="inputClass"></el-input>
<el-select :disabled='disabled' v-model="field" @change="emit" :multiple='multiple' :filterable='filterable' :clearable='clearable' v-if='type === "select"'>
......@@ -125,7 +124,7 @@ export default {
emit() {
this.$emit('input', this.newVal)
this.$emit('change', this.newVal)
this.$emit('')
this.$emit('focus')
}
},
computed: {
......
......@@ -35,6 +35,7 @@
clearable="true"
@change="item.change"
@clear="item.clear"
:placeholder="item.label?item.label:'请选择'"
v-if="item.type === 'select'"
>
<el-option
......@@ -110,7 +111,7 @@
v-if="item.type === 'date' && !item.valueFormat"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
:placeholder="item.label?item.label:'选择日期'"
>
</el-date-picker>
......@@ -119,7 +120,7 @@
v-if="item.type === 'date' && item.valueFormat"
type="date"
:value-format="item.valueFormat"
placeholder="选择日期"
:placeholder="item.label?item.label:'选择日期'"
>
</el-date-picker>
......@@ -128,7 +129,7 @@
v-if="item.type === 'month' && !item.valueFormat"
type="month"
value-format="yyyy-MM"
placeholder="选择月份"
:placeholder="item.label?item.label:'选择月份'"
>
</el-date-picker>
......@@ -137,7 +138,7 @@
v-if="item.type === 'month' && item.valueFormat"
type="month"
:value-format="item.valueFormat"
placeholder="选择月份"
:placeholder="item.label?item.label:'选择月份'"
>
</el-date-picker>
......
<template>
<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>
</template>
<script>
export default {
props:{
type:Object,
default:{}
},
methods:{
submitFileForm(){
this.$refs.upload.submit();
this.$emit('submitFileForm',true)
}
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<div class="page">
<LayoutTable :data="tableData" :config="tableConfig"></LayoutTable>
<LayoutTable :data="tableData" notDel :config="tableConfig"></LayoutTable>
<drawer-show ref="drawerform" @ok="getData" />
</div>
</template>
......@@ -72,6 +72,12 @@
config: {
isshowTabPane:true,
search: [
{
name: "staffName",
type: "text",
label: "考勤组名称",
fuzzy: true
},
],
columns: [
{type: "selection", width: 60},
......@@ -113,7 +119,7 @@
width: 240,
formatter: row => {
return (
<table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} />
<table-buttons noAdd noView row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} />
);
}
}
......
<template>
<div class="container">
<el-card style="min-height:80vh;padding:15px">
<div class="flex flex_end">
<el-button type="primary" size="mini" @click="$router.back()">返回上一级</el-button>
</div>
<tab-pane :activeName="activeName" :thirdList="thirdList"></tab-pane>
<div class="mt20">
<div>考勤组名称</div>
<el-input placeholder="请输入考勤组名称" style="width:220px" class="mt10"></el-input>
......@@ -80,26 +82,26 @@
direction="rtl"
:before-close="handleClose">
<!-- 考勤人员 -->
<div>参与考勤人员(0)</div>
<div>无需考勤人员(0)</div>
<div>
<div>参与考勤人员(0)</div>
<el-input @focus="selectGroup()" size="mini" placeholder="请选择"></el-input>
</div>
<div>
<div>无需考勤人员(0)</div>
<el-input @focus="selectGroup()" size="mini" placeholder="请选择"></el-input>
</div>
<!-- 考勤组 -->
<div>
<span>考勤组负责人:</span>
<el-select>
<el-option></el-option>
</el-select>
<el-select></el-select>
</div>
<div>
<span>主负责人:</span>
<el-select>
<el-option></el-option>
</el-select>
<el-select></el-select>
</div>
<div>
<span>子负责人:</span>
<el-select>
<el-option></el-option>
</el-select>
<el-select></el-select>
</div>
<div>
<span>子负责人权限:</span>
......@@ -138,11 +140,53 @@
<div>
<div>特殊日期</div>
</div>
<div class="mt10">
<el-button>+新增必须打卡的日期</el-button>
</div>
<div class="mt10">
<el-button>+新增无需打卡的日期</el-button>
</div>
<div>
<div>考勤方式</div>
<el-checkbox-group v-model="type">
<el-checkbox label="地点打卡"></el-checkbox>
<el-checkbox label="Wi-Fi打卡"></el-checkbox>
<el-checkbox label="蓝牙打卡"></el-checkbox>
<el-checkbox label="考勤机打卡"></el-checkbox>
</el-checkbox-group>
</div>
</div>
</el-drawer>
<!-- 选择biao -->
<!-- 选择成员 -->
<el-dialog :visible.sync="isshowgroup" title="选择人员">
<div>
<div class="titles">选择部门</div>
<el-scrollbar style="height: 100%">
<el-tree
size="mini"
ref="siteTree"
:data="areaData"
id="el-tree"
node-key="id"
indent="4"
:props="treeProps"
:load="loadNode"
highlight-current
default-expand-all
:expand-on-click-node="false"
:render-content="renderContent"
@node-click="handleNodeClick"
>
</el-tree>
</el-scrollbar>
</div>
</el-dialog>
<!-- 选择班次 -->
<el-dialog :visible.sync="isshowBanci" title="选择班次">
<div>
选择班次
</div>
</el-dialog>
</div>
</template>
......@@ -156,6 +200,9 @@
changeBanci(row){
console.log(row)
this.isshowBanci = true
},
selectGroup(){
this.isshowgroup = true
}
},
data() {
......@@ -192,22 +239,39 @@
},
drawer:true,
weekList:[],
isshowBanci:false//班次展示
isshowBanci:false,//班次展示
isshowgroup:false,
areaData:[],
type:[]
}
}
}
</script>
<style lang="less">
.labelClass{
width: 200px;
}
.el-descriptions__body{
margin-left: 5px;
margin-right: 5px;
color: #606266;
background-color: #FFF;
}
.contentClass{
width: 600px;
}
.labelClass{
width: 200px;
}
.el-descriptions__body{
margin-left: 5px;
margin-right: 5px;
color: #606266;
background-color: #FFF;
}
.contentClass{
width: 600px;
}
.titles{
color: #409EFF;
font-size: 16px;
display: flex;
align-items: center;
}
.titles::before{
content: '';
width:6px;
height: 16px;
background-color: #409EFF;
display: inline-block;
margin-right: 10px;
}
</style>
\ No newline at end of file
<template>
<div class="page">
<LayoutTable :data="tableData" :config="tableConfig">
</LayoutTable>
<LayoutTable :data="tableData" :config="tableConfig" notDel notAdd>
<el-button
slot="table-head-left2"
style="margin-left: 10px"
size="mini"
type="primary"
@click="morehandle"
>批量处理</el-button>
</LayoutTable>
<dialog-show ref="dialogform" @ok="getData" />
</div>
</template>
......@@ -33,28 +38,69 @@
toView(row) {
this.$refs.dialogform.view(row);
},
morehandle(){
console.log(this.selection)
}
},
data() {
return {
config: {
isshowTabPane:true,
search: [
{
name: "staffName",
type: "text",
label: "员工姓名",
name: "deptId",
type: "select",
label: "全部部门",
fuzzy: true
},
{
name: "deptId",
type: "text",
label: "所属部门",
type: "select",
label: "全部考勤组",
fuzzy: true
},
{
name: "deptId",
type: "select",
label: "全部班次",
fuzzy: true
},
{
name: "errorStatus",
type: "select",
label: "全部异常状态",
fuzzy: true
},
{
name: "errorStatus",
type: "select",
label: "异常状态",
label: "全部处理状态",
fuzzy: true
},
{
name:'startTime',
type: "date",
valueFormat:'YYYY-dd-MM',
label: "考勤开始时间",
fuzzy: true
},
{
name:'endTime',
type: "date",
valueFormat:'YYYY-dd-MM',
label: "考勤结束时间",
fuzzy: true
},
{
name: "staffName",
type: "text",
label: "员工姓名",
fuzzy: true
},
{
name: "phoneNumber",
type: "text",
label: "手机号",
fuzzy: true
},
],
......@@ -63,26 +109,21 @@
{type: "index",label: "序号",width: 50},
{label: "员工姓名", prop: "staffName"},
{label: "上下班时间", prop: "goOffDateTime", formatter: this.formatterDate},
{label: "异常状态", prop: "errorStatus",formatter: this.formatter},
{label: "异常时间", prop: "errorDateTime", formatter: this.formatterDate},
{label: "处理结果", prop: "errorDateTime", formatter: this.formatterDate},
{label: "上下班时间", prop: "goOffDateTime", formatter: this.formatterDate},
{label: "实际打卡时间", prop: "actualAttendanceDateTime", formatter: this.formatterDate},
{label: "处理时间", prop: "operDateTime", formatter: this.formatterDate},
{label: "异常状态", prop: "errorStatus",formatter: this.formatter},
{label: "处理状态", prop: "processStatus",formatter: this.formatter},
{label: "创建用户", prop: "createUserId", formatter: this.formatter},
{label: "处理人", prop: "processStatus",formatter: this.formatter},
{label: "备注", prop: "createUserId", formatter: this.formatter},
{
label: "操作",
width: 240,
formatter: row => {
return (
<table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} />
<table-buttons noAdd noEdit noView noDel row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} />
);
}
}
......
<template>
<div class="page">
<LayoutTable :data="tableData" :config="tableConfig">
</LayoutTable>
<LayoutTable :data="tableData" :config="tableConfig"></LayoutTable>
<dialog-show ref="dialogform" @ok="getData" />
</div>
......@@ -38,6 +36,7 @@
data() {
return {
config: {
isshowTabPane:true,
search: [
{
name: "staffName",
......
<template>
<div class="page">
<LayoutTable :data="tableData" :config="tableConfig"></LayoutTable>
<LayoutTable :data="tableData" :config="tableConfig" notSearch></LayoutTable>
<drawer-show ref="drawerform" @ok="getData" />
</div>
</template>
......@@ -54,9 +54,7 @@
columns: [
{type: "selection", width: 60},
{type: "index",label: "序号",width: 50},
// {label: "祖级列表", prop: "ancestors"},
{label: "部门名称", prop: "deptName"},
{label: "成员数量", prop: "deptName"},
{label: "负责人", prop: "deptName"},
......
......@@ -29,7 +29,7 @@
</el-scrollbar>
</el-col>
<el-col :span="18" :xs="12" class="mytree">
<LayoutTable :data="tableData" :config="tableConfig">
<LayoutTable :data="tableData" :config="tableConfig" notSearch>
<el-button type="primary" @click="doExport" :disabled="isExport"
size="mini" slot="table-head-left2">导出</el-button>
</LayoutTable>
......@@ -65,9 +65,27 @@
}
},
methods: {
renderContent: function (h, { node, data, store }) {
return (
<span>
<i style="font-size:16px;color:#409EFF" class={data.icon}></i>
<span style="padding-left: 2px;font-size:14px">{node.label}</span>
<span>
<i style="font-size:16px;color:#409EFF" class='el-icon-edit-outline'></i>
<i style="font-size:16px;color:#409EFF" class='el-icon-delete'></i>
</span>
</span>
)
},
async loadNode(node, resolve) {
if (node.level === 0) {
return;
}
resolve(data.result);
},
doExport(){
this.isExport = true;
this.$download("/staff/list/exportExcel", {
this.$download("/job/exportExcel", {
"idList": this.selection,
'name': this.$route.query['name'],
}, { type: "excel" }).then(() => this.isExport = false).catch(error => {
......
......@@ -24,8 +24,12 @@
<Field label="所属部门" prop="deptName" v-model="form.deptName" placeholder="请选择所属部门" @focus="ishowBumen = true"/>
<Field label="职位" prop="positionId" v-model="form.positionId" :enumData="dict.politicalstatus" type="select" placeholder="请选择职位" />
<!-- <Field label="职位" prop="positionId" v-model="form.positionId" :enumData="dict.politicalstatus" type="select" placeholder="请选择职位" /> -->
<el-form-item label="职位" prop="positionId">
<el-select v-model="form.positionId" placeholder="请选择职位">
<el-option></el-option>
</el-select>
</el-form-item>
<Field label="工号" prop="workNum" v-model="form.workNum" placeholder="请输入工号"/>
<!-- <Field label="是否在政务大厅" prop="positionId" v-model="form.positionId" placeholder="请选择" type="select"/> -->
......
......@@ -3,14 +3,14 @@
<div style="margin:10px 0">
<tab-pane :thirdList="thirdList" :activeName="activeName" @handleClick="handleClick"></tab-pane>
</div>
<div class="totalNum flex">
<div class="totalNum flex" v-if="tableData.staff">
<div class="item">在职员工 <span class="num">{{tableData.staff.inWorkStaff}}</span></div>
<div class="item flex">
<div>全职 <span class="num">{{tableData.staff.fullStaff}}</span></div>
<div>实习 <span class="num">{{tableData.staff.pricateStaff}}</span></div>
<!-- 兼职未对 -->
<div>兼职 <span class="num">{{tableData.staff.inWorkStaff}}</span></div>
<div>兼职 <span class="num">{{tableData.staff.concurrentlyStaff}}</span></div>
</div>
<div class="item flex">
......@@ -29,7 +29,6 @@
:data="areaData"
id="el-tree"
node-key="id"
indent="4"
:props="treeProps"
:load="loadNode"
highlight-current
......@@ -133,7 +132,7 @@
methods: {
/** 导入 */
handleImport() {
this.upload.title = "员工关怀信息导入";
this.upload.title = "员工导入";
this.upload.open = true;
},
handleClick(key){
......
......@@ -18,7 +18,7 @@
<span class="tags">{{info.workStatus}}</span>
</div>
<div class="c2">
<span>{{info.workDept}}</span>
<span>{{allinfo.deptName}} - {{allinfo.positionName}}</span>
<span style="margin:0 10px">|</span>
<span>{{info.workLimit}}</span>
</div>
......@@ -112,6 +112,8 @@
if(res.code == 1){
this.info = res.data.holidayLists[0]
this.allinfo = res.data//总
this.info.workBeginDay = timestampToTime(Number(this.info.workBeginDay))
this.info.workFormalDay = timestampToTime(Number(this.info.workFormalDay))
}
})
.catch(err => {
......
......@@ -13,9 +13,8 @@
/>
</el-form-item>
</el-col>
<!-- <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="ID" prop="id" v-model="form.id" v-if='pageInfo.type !== "add"' disabled />-->
<Field label="名称" prop="name" v-model="form.name"/>
<Field label="权限类型" prop="authType" v-model="form.authType" :enumData='dict.authType' type='select' />
<Field label="访问地址" prop="url" v-model="form.url" />
<Field label="状态" prop="status" v-model="form.status" :enumData='dict.status' type='radio' />
......@@ -50,6 +49,7 @@ export default {
data() {
return {
fileContent:"",
id:null,
icons: [
'info', 'error', 'success', 'warning', 'question',
'tickets', 'document', 'goods', 'sold-out', 'news',
......@@ -102,6 +102,7 @@ export default {
this.urls.currUrl = this.pageInfo.addUrl;
this.getData();
if(row.id){
this.id=row.id
this.form.parentId=row.id
}
this.menuOptions = menuOptions;
......@@ -121,6 +122,9 @@ export default {
},
/**获取数据后弹框 */
afterRender(data) {
if(this.id){
this.form.parentId=this.id
}
this.open = true;
},
afterSubmit(data) {
......
......@@ -17,9 +17,7 @@
<profiles>
<profile>
<id>develop</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<profiles.active>develop</profiles.active>
<profiles.server.port>17500</profiles.server.port>
......@@ -36,6 +34,9 @@
</profile>
<profile>
<id>test</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<profiles.active>test</profiles.active>
<profiles.server.port>17500</profiles.server.port>
......
......@@ -19,6 +19,7 @@ public class ManagerApplication extends BaseWebApplication {
public static void main(String[] args) {
SpringApplication.run(ManagerApplication.class, args);
System.out.println(123465);
}
......
......@@ -166,12 +166,16 @@ public class MenuServiceImpl extends AbstractCRUDServiceImpl<MenuDao, MenuEntity
MenuQuery query = new MenuQuery();
query.setParentId(entity.getParentId());
Comparator<Integer> comparator = Comparator.comparing(Integer::intValue);
Optional<Integer> maxOptional = this.find(query).stream().map(MenuEntity::getOrderId).filter(f->f!=9999).max(comparator);
Optional<Integer> maxOptional = this.find(query).stream().map(item->{
if(ObjectUtils.isEmpty(item.getOrderId())) return 1;
return item.getOrderId();
}).filter(f->f!=9999).max(comparator);
maxOptional.ifPresent(e -> {
e=e+1;
entity.setOrderId(e);
});
MenuEntity parentMenuEntity = this.get(entity.getParentId());
if (!ObjectUtils.isEmpty(parentMenuEntity) && SatusEnum.DISENABLE.getValue() == parentMenuEntity.getStatus()) {
throw new AppException("菜单信息停用,不允许新增");
......
......@@ -218,9 +218,11 @@ public class ArtemisPostTest {
// System.out.println(VechicleDataResult);
String result = callPostApiGetPersonList();
System.out.println(result);
// String result = callPostApiGetPersonList();
// System.out.println(result);
//callPostApiGetPersonList
String result = callPostApiGetDeptList();
System.out.println(result);
}
......
......@@ -64,4 +64,4 @@ public enum AttendanceTypeEnum {
}
return resultMap;
}
}
}
\ No newline at end of file
......@@ -58,6 +58,7 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
staffEntity1.setDeptName(list.getOrgName());
staffEntity1.setDeptId(Long.valueOf(list.getOrgIndexCode()));
staffEntity1.setDeptName(list.getOrgName());
staffEntity1.setSource(1);
if (list.getBirthday()!=null){
staffEntity1.setBirthday((Date) list.getBirthday());
}
......@@ -74,8 +75,18 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
if (staffEntity.getRemark().equals(list.getPersonId())) {
//执行修改
staffEntity.setName(list.getPersonName());
staffEntity.setRemark(list.getPersonId());
staffEntity.setPhotoPath(list.getPersonPhoto().getPicUri());
staffEntity.setDeptName(list.getOrgName());
staffEntity.setDeptId(Long.valueOf(list.getOrgIndexCode()));
staffEntity.setDeptName(list.getOrgName());
staffEntity.setSource(1);
if (list.getBirthday()==null && staffEntity.getBirthday()!=null){
staffEntity.setBirthday(staffEntity.getBirthday());
}
if (list.getPhoneNo()!=null && staffEntity.getPhoneNumber()!=null){
staffEntity1.setPhoneNumber(staffEntity.getPhoneNumber());
}
staffDao.update(staffEntity);
}
for (ListItem item :personHikData.getList()){
......
package com.mortals.xhx.module.attendance.service.impl;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.module.attendance.dao.AttendanceClassDao;
import com.mortals.xhx.module.attendance.model.AttendanceClassEntity;
import com.mortals.xhx.module.attendance.service.AttendanceClassService;
import org.springframework.beans.factory.annotation.Autowired;
import com.mortals.xhx.module.attendance.model.AttendanceClassDetailEntity;
import com.mortals.xhx.module.attendance.model.AttendanceClassDetailQuery;
import com.mortals.xhx.module.attendance.model.AttendanceClassEntity;
import com.mortals.xhx.module.attendance.service.AttendanceClassDetailService;
import com.mortals.xhx.module.attendance.service.AttendanceClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import java.util.Arrays;
import java.util.Date;
import java.util.Arrays;
import java.util.List;
......
......@@ -24,7 +24,8 @@ public class DeptDaoImpl extends BaseCRUDDaoMybatis<DeptEntity,Long> implements
@Override
public List<DeptEntity> queryAllList() {
return null;
return this.getList(new DeptEntity());
}
}
......@@ -21,4 +21,29 @@ public interface StaffDao extends ICRUDDao<StaffEntity,Long>{
* */
List<StaffEntity> queryAllList();
/**
* 所有在职员工
* */
int queryInWork();
/**
* 在职
* */
int queryFull();
/**
* 实习
* */
int queryPricate();
/**
* 试用
* */
int queryOnTrial();
/**
* 正式
* */
int queryFormal();
}
......@@ -2,7 +2,6 @@ package com.mortals.xhx.module.staff.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.staff.model.StaffLeaveEntity;
import java.util.List;
/**
* 员工离职信息Dao
* 员工离职信息 DAO接口
......@@ -13,5 +12,8 @@ import java.util.List;
public interface StaffLeaveDao extends ICRUDDao<StaffLeaveEntity,Long>{
/**
* 待离职
* */
int queryResignation();
}
......@@ -19,6 +19,33 @@ public class StaffDaoImpl extends BaseCRUDDaoMybatis<StaffEntity,Long> implement
@Override
public List<StaffEntity> queryAllList() {
return null;
return this.getList(new StaffEntity());
}
@Override
public int queryInWork() {
return this.getSqlSession().selectOne(this.getSqlId("queryInWork"));
}
@Override
public int queryFull() {
return this.getSqlSession().selectOne(this.getSqlId("queryFull"));
}
@Override
public int queryPricate() {
return this.getSqlSession().selectOne(this.getSqlId("queryPricate"));
}
@Override
public int queryOnTrial() {
return this.getSqlSession().selectOne(this.getSqlId("queryOnTrial"));
}
@Override
public int queryFormal() {
return this.getSqlSession().selectOne(this.getSqlId("queryFormal"));
}
}
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.StaffLeaveDao;
import com.mortals.xhx.module.staff.model.StaffLeaveEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
import org.springframework.stereotype.Repository;
/**
* 员工离职信息DaoImpl DAO接口
*
......@@ -17,5 +15,8 @@ import java.util.List;
public class StaffLeaveDaoImpl extends BaseCRUDDaoMybatis<StaffLeaveEntity,Long> implements StaffLeaveDao {
@Override
public int queryResignation() {
return this.getSqlSession().selectOne(this.getSqlId("queryResignation"));
}
}
package com.mortals.xhx.module.staff.model.vo;
import lombok.Data;
@Data
public class StaffInfoVo {
//在职员工
private Integer inWorkStaff;
//全职
private Integer fullStaff;
//实习
private Integer pricateStaff;
//试用
private Integer onTrialStaff;
//正式
private Integer formalStaff;
//待离职
private Integer resignationStaff;
}
......@@ -15,4 +15,6 @@ public class StaffVo extends BaseEntityLong {
private List <Long> idList;
private List<HolidayListVo> holidayLists;
private List<StaffInfoVo>staffInfoVos;
}
\ 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;
import com.mortals.framework.service.ICRUDCacheService;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.model.vo.StaffInfoVo;
/**
* StaffService
*
......@@ -12,4 +13,5 @@ import com.mortals.xhx.module.staff.model.StaffEntity;
*/
public interface StaffService extends ICRUDCacheService<StaffEntity,Long> {
StaffInfoVo queryAll();
}
\ No newline at end of file
package com.mortals.xhx.module.staff.service.impl;
import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.staff.dao.StaffDao;
import com.mortals.xhx.module.staff.dao.ibatis.StaffDaoImpl;
import com.mortals.xhx.module.staff.dao.ibatis.StaffLeaveDaoImpl;
import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.model.vo.StaffInfoVo;
import com.mortals.xhx.module.staff.service.StaffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* StaffService
* 员工基本信息 service实现
*
* @author zxfei
* @date 2023-04-07
*/
* StaffService
* 员工基本信息 service实现
*
* @author zxfei
* @date 2023-04-07
*/
@Service("staffService")
public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, StaffEntity, Long> implements StaffService {
@Override
protected String getExtKey(StaffEntity data) {
@Autowired
private StaffDaoImpl staffDao;
@Autowired
private StaffLeaveDaoImpl staffLeaveDao;
//工号作为redis 扩展key
@Override
protected String getExtKey(StaffEntity data) {
//工号作为redis 扩展key
return data.getWorkNum();
}
@Override
public StaffInfoVo queryAll() {
StaffInfoVo staffInfoVo = new StaffInfoVo();
staffInfoVo.setInWorkStaff(staffDao.queryInWork());
staffInfoVo.setFullStaff(staffDao.queryFull());
//有值
staffInfoVo.setFormalStaff(staffDao.queryFormal());
staffInfoVo.setOnTrialStaff(staffDao.queryOnTrial());
staffInfoVo.setPricateStaff(staffDao.queryPricate());
staffInfoVo.setResignationStaff(staffLeaveDao.queryResignation());
return staffInfoVo;
}
}
\ No newline at end of file
......@@ -6,7 +6,7 @@ import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.model.vo.HolidayListVo;
import com.mortals.xhx.module.staff.model.vo.StaffVo;
import com.mortals.xhx.module.staff.model.vo.StaffInfoVo;
import com.mortals.xhx.module.staff.service.StaffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -51,12 +51,10 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ
@Override
protected int doListAfter(StaffEntity query, Map<String, Object> model, Context context) throws AppException {
//
model.put("stat",new StaffVo());
//todo 员工信息统计--员工关系统计
StaffInfoVo staffInfoVo = this.service.queryAll();
System.out.println("ssss"+staffInfoVo);
model.put("staff", staffInfoVo);
return super.doListAfter(query, model, context);
}
......@@ -89,6 +87,4 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ
return super.infoAfter(id, model, entity, context);
}
}
\ No newline at end of file
......@@ -1258,4 +1258,7 @@
</trim>
</if>
</sql>
<select id="queryResignation" resultType="integer">
select count(1) resignationStaff from mortals_xhx_staff_leave where auditStatus = 1
</select>
</mapper>
\ No newline at end of file
......@@ -1318,4 +1318,20 @@
</trim>
</if>
</sql>
<select id="queryInWork" resultType="integer">
select count(1) inWorkStaff from mortals_xhx_staff where status <![CDATA[<>]]> 3
</select>
<select id="queryFull" resultType="integer">
select count(1) fullStaff from mortals_xhx_staff where staffType = 1
</select>
<select id="queryPricate" resultType="integer">
select count(1) pricateStaff from mortals_xhx_staff where staffType = 3
</select>
<select id="queryOnTrial" resultType="integer">
select count(1) onTrialStaff from mortals_xhx_staff where status = 2
</select>
<select id="queryFormal" resultType="integer">
select count(1) formalStaff from mortals_xhx_staff where status = 1
</select>
</mapper>
\ No newline at end of file
###登录
POST {{baseUrl}}/login/login
Content-Type: application/json
{
"loginName":"admin",
"password":"admin",
"securityCode":"8888"
}
> {%
client.global.set("SmsSet_id", JSON.parse(response.body).data.id);
client.global.set("authToken", JSON.parse(response.body).data.token);
%}
###职位信息列表
POST {{baseUrl}}/job/list
Authorization: {{authToken}}
Content-Type: application/json
{
"page":1,
"size":10
}
###职位信息更新与保存
POST {{baseUrl}}/job/save
Authorization: {{authToken}}
Content-Type: application/json
{
"groupId":243,
"groupName":"2g2sug",
"jobCode":"p0m3o4",
"jobName":"3dnfdt",
"remark":"brj4yu",
}
> {%
client.global.set("Job_id", JSON.parse(response.body).data.id);
%}
###职位信息查看
GET {{baseUrl}}/job/info?id={{Job_id}}
Authorization: {{authToken}}
Accept: application/json
###职位信息编辑
GET {{baseUrl}}/job/edit?id={{Job_id}}
Authorization: {{authToken}}
Accept: application/json
###职位信息删除
GET {{baseUrl}}/job/delete?id={{Job_id}}
Authorization: {{authToken}}
Accept: application/json
......@@ -18,7 +18,6 @@ POST {{baseUrl}}/staff/list
Content-Type: application/json
{
"idList": [1,3],
"page":1,
"size":10
}
......
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