-
- 在岗人数
+
+ 在岗人员
-
-
@@ -142,7 +141,7 @@
{{ attendanceTotal }} 人
-
{{ attendanceNav == 0 ? '在岗人数' : '今日出勤' }}
+
{{ attendanceNav == 0 ? '在岗人员' : '今日出勤' }}
@@ -494,6 +493,7 @@
+
@@ -501,13 +501,15 @@
import projectInfoDialog from './detail/projectInfoDialog.vue';
import staffSurveyChart from '@/components/staffSurveyChart.vue';
import MonitAndWarning from './components/MonitAndWarning.vue';
+import attendanceInfoDlg from './detail/attendanceInfoDlg.vue';
import testData from './test/detail'
import debounce from 'lodash.debounce'
export default {
components: {
projectInfoDialog,
staffSurveyChart,
- MonitAndWarning
+ MonitAndWarning,
+ attendanceInfoDlg,
},
data() {
return {
@@ -525,9 +527,9 @@ export default {
attendanceNav: 0,
attendanceTotal: 0,
attendanceData: [
- { text: "普通工种", value: 10 },
- { text: "特殊工种", value: 20 },
- { text: "管理人员", value: 30 },
+ { text: "普通工种", value: 0, id: 0, },
+ { text: "特殊工种", value: 0, id: 0, },
+ { text: "管理人员", value: 0, id: 0, },
],
deviceNav: 0,
deviceData: [
@@ -619,6 +621,33 @@ export default {
this.getWeatherNowInfo();
}
});
+ this.loadAttendanceData();
+ },
+ loadAttendanceData() {
+ let ajax = this.$api.detail.groupByCraftType;
+ let posData = {
+ comId: this.prjInfo.comId,
+ projectId: this.prjInfo.id
+ }
+ if (this.attendanceNav == 1) {
+ ajax = this.$api.detail.groupByCraftTypeByAttendance;
+ //posData.createTime = this.$dt(new Date()).format("YYYY-MM-DD");
+ posData.createTime ='2024-10-13';
+ }
+ ajax(posData).then(d => {
+ this.attendanceData = (d.data || []).map(it => {
+ return {
+ text: it.createBy,
+ value: it.id || 0,
+ id: it.craftType
+ }
+ });
+ let count = 0;
+ this.attendanceData.forEach(it => {
+ count += it.value;
+ });
+ this.attendanceTotal = count;
+ });
},
getWeatherNowInfo() {
this.$api.weather.getCityNowInfo(this.cityId).then(cn => {
@@ -628,9 +657,15 @@ export default {
},
doAttendanceNav(n) {
this.attendanceNav = n;
+ this.loadAttendanceData();
},
doShowAttendanceDetail() {
-
+ this.$refs.attDlg.showDialog({
+ prjInfo: this.prjInfo,
+ attendanceData: this.attendanceData,
+ type: this.attendanceNav
+ }
+ );
},
doDeviceNav(n) {
this.deviceNav = n;
@@ -938,7 +973,12 @@ export default {
}
}
}
+ .attendance-info-title {
+ * {
+ font-size: 24px;
+ }
+ }
.attendance-tag {
* {
font-size: 24px;
@@ -1430,13 +1470,15 @@ export default {
.dangerous-timeline-max {
width: 1790px;
height: 570px;
- .strip-max{
- top:136px;
+
+ .strip-max {
+ top: 136px;
}
+
.dangerous-timeline-con {
width: 500px;
font-size: 42px;
-
+
}
.dangerous-text {
diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/ProProjectInfoSubdeptsUsersMapper.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/ProProjectInfoSubdeptsUsersMapper.java
index fa65c709..52cae656 100644
--- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/ProProjectInfoSubdeptsUsersMapper.java
+++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/ProProjectInfoSubdeptsUsersMapper.java
@@ -66,4 +66,12 @@ public interface ProProjectInfoSubdeptsUsersMapper
* @return 结果
*/
public int findUserByUserPhone(String phonenumber);
+ /**
+ * 大屏-项目详情-在岗人员统计
+ */
+ List
groupByCraftType(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers);
+ /**
+ * 大屏-项目详情-今日出勤期统计
+ */
+ List groupByCraftTypeByAttendance(ProProjectInfoSubdeptsUsers where);
}
diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsUsersMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsUsersMapper.xml
index 451add76..5c1164c1 100644
--- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsUsersMapper.xml
+++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsUsersMapper.xml
@@ -218,4 +218,61 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select count(1) from sys_user where phonenumber=#{phonenumber}
+
+
+
+
\ No newline at end of file
diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProProjectInfoSubdeptsUsersController.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProProjectInfoSubdeptsUsersController.java
index 39ccdb65..4614b3f8 100644
--- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProProjectInfoSubdeptsUsersController.java
+++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProProjectInfoSubdeptsUsersController.java
@@ -49,6 +49,25 @@ public class ProProjectInfoSubdeptsUsersController extends BaseController
return getDataTable(list);
}
+ /**
+ * 大屏-项目详情-在岗人员统计
+ */
+ @RequiresPermissions("manage:proProjectInfoSubdeptsUsers:list")
+ @GetMapping("/groupByCraftType")
+ public AjaxResult groupByCraftType(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers){
+ List list = proProjectInfoSubdeptsUsersService.groupByCraftType(proProjectInfoSubdeptsUsers);
+ return AjaxResult.success(list);
+ }
+
+ /**
+ * 大屏-项目详情-今日出勤期统计
+ */
+ @RequiresPermissions("manage:proProjectInfoSubdeptsUsers:list")
+ @GetMapping("/groupByCraftTypeByAttendance")
+ public AjaxResult groupByCraftTypeByAttendance(ProProjectInfoSubdeptsUsers where){
+ List list = proProjectInfoSubdeptsUsersService.groupByCraftTypeByAttendance(where);
+ return AjaxResult.success(list);
+ }
/**
* 导出分包单位工人列表
*/
diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProProjectInfoSubdeptsUsersService.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProProjectInfoSubdeptsUsersService.java
index 6a786c98..7056099c 100644
--- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProProjectInfoSubdeptsUsersService.java
+++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProProjectInfoSubdeptsUsersService.java
@@ -59,5 +59,12 @@ public interface IProProjectInfoSubdeptsUsersService
*/
public int deleteProProjectInfoSubdeptsUsersById(Long id);
-
+ /**
+ * 大屏-项目详情-在岗人员统计
+ */
+ List groupByCraftType(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers);
+ /**
+ * 大屏-项目详情-今日出勤期统计
+ */
+ List groupByCraftTypeByAttendance(ProProjectInfoSubdeptsUsers where);
}
diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java
index 18c391bb..574317f3 100644
--- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java
+++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java
@@ -65,6 +65,7 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
@Override
public int insertProProjectInfoSubdeptsUsers(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers)
{
+ proProjectInfoSubdeptsUsers.setUseStatus("0");
proProjectInfoSubdeptsUsers.setCreateTime(DateUtils.getNowDate());
proProjectInfoSubdeptsUsers.setCreateBy(SecurityContextHolder.getUserName());
SysUser user=proProjectInfoSubdeptsUsers.getUser();
@@ -131,4 +132,18 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
uniService.syncUserRevoke(id);
return proProjectInfoSubdeptsUsersMapper.deleteProProjectInfoSubdeptsUsersById(id);
}
+ /**
+ * 大屏-项目详情-在岗人员统计
+ */
+ @Override
+ public List groupByCraftType(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers) {
+ return proProjectInfoSubdeptsUsersMapper.groupByCraftType(proProjectInfoSubdeptsUsers);
+ }
+ /**
+ * 大屏-项目详情-今日出勤期统计
+ */
+ @Override
+ public List groupByCraftTypeByAttendance(ProProjectInfoSubdeptsUsers where) {
+ return proProjectInfoSubdeptsUsersMapper.groupByCraftTypeByAttendance(where);
+ }
}