diff --git a/ruoyi-ui/src/views/project/attendance/attendanceDrawer.vue b/ruoyi-ui/src/views/project/attendance/attendanceDrawer.vue
new file mode 100644
index 00000000..89f02a44
--- /dev/null
+++ b/ruoyi-ui/src/views/project/attendance/attendanceDrawer.vue
@@ -0,0 +1,58 @@
+
+
+
+
+ {{ title + " 【劳务实名管理-考勤记录】" }}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ruoyi-ui/src/views/project/attendance/index.vue b/ruoyi-ui/src/views/project/attendance/index.vue
index 5e102563..57e93828 100644
--- a/ruoyi-ui/src/views/project/attendance/index.vue
+++ b/ruoyi-ui/src/views/project/attendance/index.vue
@@ -2,7 +2,7 @@
-
+
@@ -20,7 +20,7 @@
搜索
重置
- 设置
@@ -49,7 +49,7 @@
-
+
@@ -170,21 +170,22 @@ export default {
rules: {
},
projectOptions: [],
- depts: []
+ depts: [],
+ prjDisabled:false,
};
},
- created() {
- //this.getList();
+ created() {
this.$api.publics.getMyProjectList({}).then((response) => {
- this.projectOptions = response.rows;
- });
- /*
- queryAttendanceData('2023-09-25').then(d=>{
- debugger
- })*/
+ this.projectOptions = response.rows;
+ });
},
methods: {
- doQuerySub() {
+ init(prj){
+ this.queryParams.projectId=prj.id;
+ this.prjDisabled=true;
+ this.doQuerySub(true);
+ },
+ doQuerySub(init) {
let tmps = this.prjDept2 && this.prjDept2[this.queryParams.projectId] ? this.prjDept2[this.queryParams.projectId] || [] : [];
if (tmps.length > 0) {
this.depts = tmps;
@@ -193,6 +194,9 @@ export default {
} else {
this.queryParams.subDeptId = '';
}
+ if(init){
+ this.getList();
+ }
return;
}
this.$api.publics.queryUnitList({
@@ -210,6 +214,9 @@ export default {
} else {
this.queryParams.subDeptId = '';
}
+ if(init){
+ this.getList();
+ }
});
},
handleSetting() {
diff --git a/ruoyi-ui/src/views/project/attendanceConfig/attendanceConfigDialog.vue b/ruoyi-ui/src/views/project/attendanceConfig/attendanceConfigDialog.vue
new file mode 100644
index 00000000..2aac47d9
--- /dev/null
+++ b/ruoyi-ui/src/views/project/attendanceConfig/attendanceConfigDialog.vue
@@ -0,0 +1,226 @@
+
+
+
+
+
+
+
+
+
+ {{ form.projectName }}
+
+
+
+
+
+
+ {{ form.unitName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 启用
+ 停用
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ruoyi-ui/src/views/project/attendanceConfig/attendanceConfigDrawer.vue b/ruoyi-ui/src/views/project/attendanceConfig/attendanceConfigDrawer.vue
index 8a7943ea..9a3a4db3 100644
--- a/ruoyi-ui/src/views/project/attendanceConfig/attendanceConfigDrawer.vue
+++ b/ruoyi-ui/src/views/project/attendanceConfig/attendanceConfigDrawer.vue
@@ -29,8 +29,8 @@ export default {
},
methods: {
- show() {
- this.title = "";
+ show(title) {
+ this.title = title||""
this.isOpen = true;
setTimeout(()=>{
this.$refs.main.init();
diff --git a/ruoyi-ui/src/views/project/attendanceConfig/index.vue b/ruoyi-ui/src/views/project/attendanceConfig/index.vue
index 319931ce..67657f28 100644
--- a/ruoyi-ui/src/views/project/attendanceConfig/index.vue
+++ b/ruoyi-ui/src/views/project/attendanceConfig/index.vue
@@ -41,12 +41,13 @@
+
-
+
@@ -62,55 +63,16 @@
-
-
-
-
-
-
-
-
- {{ form.projectName }}
-
-
-
-
-
-
- {{ form.unitName }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 启用
- 停用
-
-
-
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/ruoyi-ui/src/views/project/attendanceWorker/index.vue b/ruoyi-ui/src/views/project/attendanceWorker/index.vue
index d49a78a8..39f6b7e8 100644
--- a/ruoyi-ui/src/views/project/attendanceWorker/index.vue
+++ b/ruoyi-ui/src/views/project/attendanceWorker/index.vue
@@ -1,109 +1,35 @@
-
-
-
+
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+ 全部人员
+ 在岗
+ 已退场
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
搜索
重置
-
+
新增
@@ -124,162 +50,32 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 修改
- 删除
+
+
+
+
+
+
+
+ {{ row.gender==1?'女':'男' }}
+
+
+ {{ row.enterDate|formatDate }}
+
+
+ {{ row.status==1?'已退场':'进场' }}
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -291,7 +87,7 @@ export default {
data() {
return {
// 遮罩层
- loading: true,
+ loading: false,
// 选中数组
ids: [],
// 非单个禁用
@@ -312,120 +108,79 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
- cfgid: null,
- vendorsCode: null,
- workerId: null,
- laborWorkerId: null,
- workerCategory: null,
- qrCode: null,
- name: null,
- ethnic: null,
- nativePlace: null,
- gender: null,
- birthDate: null,
- phone: null,
- degreeName: null,
- photo: null,
- recentPhoto: null,
- groupId: null,
- groupName: null,
- leader: null,
- workTypeCode: null,
- workTypeName: null,
- specWorkType: null,
- hatCode: null,
- state: null,
- enterDate: null,
- exitDate: null,
- companyId: null,
- companyName: null,
- vendorId: null,
- teamId: null,
- teamName: null,
- enterType: null,
- other: null,
- isDel: null,
+ projectId:null,
+ subDeptId:null,
+ state:'',
},
// 表单参数
form: {},
// 表单校验
- rules: {
- phone: [
- { required: true, message: "联系电话不能为空", trigger: "blur" }
- ],
- other: [
- { required: true, message: "服务返回的JSON不能为空", trigger: "blur" }
- ],
- }
+ rules: {
+ },
+ projectOptions: [],
+ depts: [],
+ prjDisabled:false,
};
},
created() {
- this.getList();
- debugger
- queryAttendanceData('2023-09-25').then(d=>{
- debugger
- })
+ this.$api.publics.getMyProjectList({}).then((response) => {
+ this.projectOptions = response.rows;
+ });
},
methods: {
+ initMe(prj){
+ this.queryParams.projectId=prj.id;
+ this.prjDisabled=true;
+ this.doQuerySub(true);
+ },
+ doQuerySub(init) {
+ this.queryParams.state="";
+ let tmps = this.prjDept2 && this.prjDept2[this.queryParams.projectId] ? this.prjDept2[this.queryParams.projectId] || [] : [];
+ if (tmps.length > 0) {
+ this.depts = tmps;
+ if (tmps.length == 1) {
+ this.queryParams.subDeptId = tmps[0].deptId;
+ } else {
+ this.queryParams.subDeptId = '';
+ }
+ if(init){
+ this.getList();
+ }
+ return;
+ }
+ this.$api.publics.queryUnitList({
+ projectId: this.queryParams.projectId,
+ unitTypes: "2".split(","),
+ }).then((d) => {
+ let objs = d.rows || [];
+ if (!this.prjDept2) {
+ this.prjDept2 = {};
+ }
+ this.prjDept2[this.queryParams.projectId] = objs;
+ this.depts = objs;
+ if (objs.length == 1) {
+ this.queryParams.subDeptId = objs[0].deptId;
+ } else {
+ this.queryParams.subDeptId = '';
+ }
+ if(init){
+ this.getList();
+ }
+ });
+ },
/** 查询考勤人员基本属性列表 */
getList() {
this.loading = true;
- listAttendanceWorker(this.queryParams).then(response => {
- this.attendanceWorkerList = response.rows;
+ listAttendanceWorker(this.queryParams).then(response => {
+ this.attendanceWorkerList = (response.rows||[]).map(it=>{
+ it.enterDate=it.enterDate?new Date(it.enterDate*1):null;
+ return it;
+ });
this.total = response.total;
this.loading = false;
});
},
- // 取消按钮
- cancel() {
- this.open = false;
- this.reset();
- },
- // 表单重置
- reset() {
- this.form = {
- id: null,
- cfgid: null,
- vendorsCode: null,
- workerId: null,
- laborWorkerId: null,
- workerCategory: null,
- qrCode: null,
- name: null,
- ethnic: null,
- nativePlace: null,
- gender: null,
- birthDate: null,
- phone: null,
- degreeName: null,
- photo: null,
- recentPhoto: null,
- groupId: null,
- groupName: null,
- leader: null,
- workTypeCode: null,
- workTypeName: null,
- specWorkType: null,
- hatCode: null,
- state: null,
- enterDate: null,
- exitDate: null,
- companyId: null,
- companyName: null,
- vendorId: null,
- teamId: null,
- teamName: null,
- enterType: null,
- other: null,
- remark: null,
- isDel: null,
- createBy: null,
- createTime: null,
- updateBy: null,
- updateTime: null
- };
- this.resetForm("form");
- },
+
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
@@ -444,40 +199,18 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
- this.reset();
this.open = true;
this.title = "添加考勤人员基本属性";
},
/** 修改按钮操作 */
handleUpdate(row) {
- this.reset();
const id = row.id || this.ids
getAttendanceWorker(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改考勤人员基本属性";
});
- },
- /** 提交按钮 */
- submitForm() {
- this.$refs["form"].validate(valid => {
- if (valid) {
- if (this.form.id != null) {
- updateAttendanceWorker(this.form).then(response => {
- this.$modal.msgSuccess("修改成功");
- this.open = false;
- this.getList();
- });
- } else {
- addAttendanceWorker(this.form).then(response => {
- this.$modal.msgSuccess("新增成功");
- this.open = false;
- this.getList();
- });
- }
- }
- });
- },
+ },
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
diff --git a/ruoyi-ui/src/views/project/surProject/index.vue b/ruoyi-ui/src/views/project/surProject/index.vue
index c459af4b..798971c9 100644
--- a/ruoyi-ui/src/views/project/surProject/index.vue
+++ b/ruoyi-ui/src/views/project/surProject/index.vue
@@ -377,6 +377,8 @@
'project:checkDetection:list',
'project:costOutput:edit',
'project:projectStandard:edit',
+ 'project:attendanceWorker:list',
+ 'project:attendance:list',
'project:surProject:remove',
]"
>
@@ -472,8 +474,17 @@
command="handleStandard"
icon="el-icon-s-grid"
v-hasPermi="['project:projectStandard:list']"
- >标准化管理
+ >标准化管理
+ 劳务实名管理
+ 劳务实名管理-考勤记录
+
+
@@ -788,6 +801,8 @@ import videoConfigDrawer from "@/views/video/videoConfig/videoConfigDrawer";
import costOutputDrawer from "@/views/project/costOutput/costOutputDrawer.vue";
import checkDetectionDrawer from "../checkDetection/checkDetectionDrawer.vue";
import standardDrawer from '@/views/project/projectStandard/projectStandardDrawer.vue'
+import attendanceDataDrawer from '@/views/project/attendance/attendanceDrawer.vue'
+import attendanceWorkerDrawer from '@/views/project/attendanceWorker/attendanceWorkerDrawer.vue'
import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
export default {
@@ -810,7 +825,9 @@ export default {
videoConfigDrawer,
costOutputDrawer,
checkDetectionDrawer,
- standardDrawer
+ standardDrawer,
+ attendanceDataDrawer,
+ attendanceWorkerDrawer
},
dicts: [
"sur_project_xmjd",
@@ -1066,6 +1083,12 @@ export default {
case "handleStandard":
this.$refs.standard.show(row);
break;
+ case "handleAttendanceWorker":
+ this.$refs.attendanceWorker.show(row);
+ break;
+ case "handleAttendanceData":
+ this.$refs.attendanceData.show(row);
+ break;
default:
break;
}
diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectAttendanceData.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectAttendanceData.java
index c8a0cd33..5bf28fe2 100644
--- a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectAttendanceData.java
+++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectAttendanceData.java
@@ -93,6 +93,16 @@ public class SurProjectAttendanceData extends BaseEntity
private Long projectId;
private Long subDeptId;
+
+ public Long getDeptId() {
+ return deptId;
+ }
+
+ public void setDeptId(Long deptId) {
+ this.deptId = deptId;
+ }
+
+ private Long deptId;
private String companyTypeId;
public Long getProjectId() {
diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectAttendanceUser.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectAttendanceUser.java
index 025c3367..f0384fa7 100644
--- a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectAttendanceUser.java
+++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectAttendanceUser.java
@@ -172,6 +172,34 @@ public class SurProjectAttendanceUser extends BaseEntity
this.outTime = outTime;
}
+ private Long projectId;
+ private Long subDeptId;
+ private Long deptId;
+
+ public Long getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(Long projectId) {
+ this.projectId = projectId;
+ }
+
+ public Long getSubDeptId() {
+ return subDeptId;
+ }
+
+ public void setSubDeptId(Long subDeptId) {
+ this.subDeptId = subDeptId;
+ }
+
+ public Long getDeptId() {
+ return deptId;
+ }
+
+ public void setDeptId(Long deptId) {
+ this.deptId = deptId;
+ }
+
public static SurProjectAttendanceUser create(JSONObject json) {
SurProjectAttendanceUser u=new SurProjectAttendanceUser();
u.workerId=json.getLong("workerId");
diff --git a/yanzhu-jh/src/main/resources/mapper/project/SurProjectAttendanceUserMapper.xml b/yanzhu-jh/src/main/resources/mapper/project/SurProjectAttendanceUserMapper.xml
index 7d0a8a7b..9c792896 100644
--- a/yanzhu-jh/src/main/resources/mapper/project/SurProjectAttendanceUserMapper.xml
+++ b/yanzhu-jh/src/main/resources/mapper/project/SurProjectAttendanceUserMapper.xml
@@ -44,10 +44,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
+
- select id, cfgid, vendors_code, workerId, laborWorkerId, workerCategory, qrCode, name, ethnic, nativePlace, gender, birthDate, phone, degreeName, photo, recentPhoto, groupId, groupName, leader, workTypeCode, workTypeName, specWorkType, hatCode, state, enterDate, exitDate, companyId, companyName, vendorId, teamId, teamName, enterType, other, remark, is_del, create_by, create_time, update_by, update_time from sur_project_attendance_user
+ SELECT * FROM (
+ SELECT a.*,b.project_id,b.sub_dept_id
+ FROM sur_project_attendance_user a,sur_project_attendance_cfg b
+ WHERE a.cfgid=b.id )
+ sur_project_attendance_user
@@ -85,6 +91,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and teamName like concat('%', #{teamName}, '%')
and enterType = #{enterType}
and other = #{other}
+ and project_id = #{projectId}
+ and sub_dept_id = #{subDeptId}
and is_del = #{isDel}