修改数字建考勤相关BUG
parent
51f31be16f
commit
0b9853268b
|
@ -2,32 +2,17 @@
|
||||||
<div class="project-labor main-page">
|
<div class="project-labor main-page">
|
||||||
<el-col :span="6" class="h100">
|
<el-col :span="6" class="h100">
|
||||||
<module-one-1-1 label="劳务人员概况" class="labor-base">
|
<module-one-1-1 label="劳务人员概况" class="labor-base">
|
||||||
|
<img src="images/icon2001.png" class="img-openwin" v-if="attendanceTotal > 0" @click="doShowAttendanceDetail" />
|
||||||
<div class="attendance-info warning-info">
|
<div class="attendance-info warning-info">
|
||||||
<div class="attendance-info-title warning-info-title">
|
<div class="attendance-info-title warning-info-title">
|
||||||
<div
|
<div :class="attendanceNav == 0 ? 'active' : ''" @click="doAttendanceNav(0, '在岗人员')">在岗人员</div>
|
||||||
:class="attendanceNav == 0 ? 'active' : ''"
|
<div :class="attendanceNav == 1 ? 'active' : ''" @click="doAttendanceNav(1, '今日出勤')">今日出勤</div>
|
||||||
@click="doAttendanceNav(0, '在岗人员')"
|
|
||||||
>
|
|
||||||
在岗人员
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
:class="attendanceNav == 1 ? 'active' : ''"
|
|
||||||
@click="doAttendanceNav(1, '今日出勤')"
|
|
||||||
>
|
|
||||||
今日出勤
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8" class="attendance-tag">
|
<el-col :span="8" class="attendance-tag">
|
||||||
<div class="survey_content">
|
<div class="survey_content">
|
||||||
<div class="survey_content_img">
|
<div class="survey_content_img">
|
||||||
<img
|
<img :src="attendanceNav == 0 ? 'images/survey_icon_4.png' : 'images/survey_icon_5.png'" />
|
||||||
:src="
|
|
||||||
attendanceNav == 0
|
|
||||||
? 'images/survey_icon_4.png'
|
|
||||||
: 'images/survey_icon_5.png'
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="survey_content_number labour-survey_content_number">
|
<div class="survey_content_number labour-survey_content_number">
|
||||||
|
@ -38,97 +23,44 @@
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="16">
|
<el-col :span="16">
|
||||||
<staffSurveyChart
|
<staffSurveyChart :key="chartKey" :height="$dpi() == '1K' ? '220px' : $dpi() == '2K' ? '330px' : '550px'" :data="attendanceData" :width="140"></staffSurveyChart>
|
||||||
:key="chartKey"
|
|
||||||
:height="
|
|
||||||
$dpi() == '1K' ? '220px' : $dpi() == '2K' ? '330px' : '550px'
|
|
||||||
"
|
|
||||||
:data="attendanceData"
|
|
||||||
:width="140"
|
|
||||||
></staffSurveyChart>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</module-one-1-1>
|
</module-one-1-1>
|
||||||
<module-one-1-1 label="劳务人员七天出勤趋势" class="labor-week-att">
|
<module-one-1-1 label="劳务人员七天出勤趋势" class="labor-week-att">
|
||||||
<my-chart
|
<my-chart :key="chartKey" id="prj_labor_chart2" width="100%" height="calc(100% - 40px)" :render="renderChart2"></my-chart>
|
||||||
:key="chartKey"
|
|
||||||
id="prj_labor_chart2"
|
|
||||||
width="100%"
|
|
||||||
height="calc(100% - 40px)"
|
|
||||||
:render="renderChart2"
|
|
||||||
></my-chart>
|
|
||||||
</module-one-1-1>
|
</module-one-1-1>
|
||||||
<module-one-1-1 label="劳务人员年龄分布">
|
<module-one-1-1 label="劳务人员年龄分布">
|
||||||
<my-chart
|
<my-chart :key="chartKey" id="prj_labor_chart3" width="100%" height="calc(100% - 0px)" :render="renderChart3"></my-chart>
|
||||||
:key="chartKey"
|
|
||||||
id="prj_labor_chart3"
|
|
||||||
width="100%"
|
|
||||||
height="calc(100% - 0px)"
|
|
||||||
:render="renderChart3"
|
|
||||||
></my-chart>
|
|
||||||
</module-one-1-1>
|
</module-one-1-1>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" class="h100">
|
<el-col :span="12" class="h100">
|
||||||
<module-one-2-2 label class="no-title no-border">
|
<module-one-2-2 label class="no-title no-border">
|
||||||
<my-chart
|
<my-chart :key="chartKey" id="prj-labor-map" width="100%" height="100%" :render="renderMap"></my-chart>
|
||||||
:key="chartKey"
|
|
||||||
id="prj-labor-map"
|
|
||||||
width="100%"
|
|
||||||
height="100%"
|
|
||||||
:render="renderMap"
|
|
||||||
></my-chart>
|
|
||||||
</module-one-2-2>
|
</module-one-2-2>
|
||||||
<module-one-1-2 label="实时进出" class="prj-labor-real">
|
<module-one-1-2 label="实时进出" class="prj-labor-real">
|
||||||
<div class="real-item" v-for="(item, index) in realList" :key="index">
|
<div class="real-item" v-for="(item, index) in realList" :key="index">
|
||||||
<div class="real-item-type" :class="'is-' + item.inOutType">
|
<div class="real-item-type" :class="'is-' + item.inOutType">
|
||||||
{{ item.inOutType === "out" ? "出" : "进" }}
|
{{ item.inOutType === "out" ? "出" : "进" }}
|
||||||
</div>
|
</div>
|
||||||
<el-image
|
<el-image class="real-item-img" fit="cover" :src="item.img" :preview-src-list="[item.img]"></el-image>
|
||||||
class="real-item-img"
|
|
||||||
fit="cover"
|
|
||||||
:src="item.img"
|
|
||||||
:preview-src-list="[item.img]"
|
|
||||||
></el-image>
|
|
||||||
<div class="real-item-name">{{ item.name }}</div>
|
<div class="real-item-name">{{ item.name }}</div>
|
||||||
<div class="real-item-work-type">
|
<div class="real-item-work-type">
|
||||||
<span>{{ item.workType }}</span>
|
<span>{{ item.workType }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="real-item-time">
|
<div class="real-item-time">
|
||||||
<span
|
<span>{{ item.inOutType === "in" ? "进场时间:" : "出场时间:" }} {{ item.inoutDate }}</span>
|
||||||
>{{ item.inOutType === "in" ? "进场时间:" : "出场时间:" }}
|
|
||||||
{{ item.inoutDate }}</span
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</module-one-1-2>
|
</module-one-1-2>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6" class="h100">
|
<el-col :span="6" class="h100">
|
||||||
<module-one-1-1
|
<module-one-1-1 label="工种占比分布" class="chart-module4" :key="chartKey">
|
||||||
label="工种占比分布"
|
<project-overview-chart :htmlShow="true" :key="'ai4' + chartKey" :sp="''" :fn="changeChart4" :maintitle="workerTotal" :legend-opt="legendOpt" :typedata="workerGroupList" :text="'总人数'" :height="chart4Height"></project-overview-chart>
|
||||||
class="chart-module4"
|
|
||||||
:key="chartKey"
|
|
||||||
>
|
|
||||||
<project-overview-chart
|
|
||||||
:htmlShow="true"
|
|
||||||
:key="'ai4' + chartKey"
|
|
||||||
:sp="''"
|
|
||||||
:fn="changeChart4"
|
|
||||||
:maintitle="workerTotal"
|
|
||||||
:legend-opt="legendOpt"
|
|
||||||
:typedata="workerGroupList"
|
|
||||||
:text="'总人数'"
|
|
||||||
:height="chart4Height"
|
|
||||||
></project-overview-chart>
|
|
||||||
</module-one-1-1>
|
</module-one-1-1>
|
||||||
<module-one-1-1 label="人员地区分布">
|
<module-one-1-1 label="人员地区分布">
|
||||||
<my-chart
|
<my-chart :key="chartKey" id="prj_labor_chart5" width="100%" height="100%" :render="renderChart5"></my-chart>
|
||||||
:key="chartKey"
|
|
||||||
id="prj_labor_chart5"
|
|
||||||
width="100%"
|
|
||||||
height="100%"
|
|
||||||
:render="renderChart5"
|
|
||||||
></my-chart>
|
|
||||||
</module-one-1-1>
|
</module-one-1-1>
|
||||||
<module-one-1-1 label="人员预警" class="prj-labor-alert">
|
<module-one-1-1 label="人员预警" class="prj-labor-alert">
|
||||||
<div class="alert-list scroll">
|
<div class="alert-list scroll">
|
||||||
|
@ -151,14 +83,20 @@
|
||||||
</div>
|
</div>
|
||||||
</module-one-1-1>
|
</module-one-1-1>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<attendanceInfoDlg ref="attDlg"></attendanceInfoDlg>
|
||||||
|
<jh-attendance-detail-dialog ref="jhAttDlg"></jh-attendance-detail-dialog>
|
||||||
|
<jh-job-worker-dialog ref="jhJobWorkerDlg"></jh-job-worker-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import attendanceInfoDlg from './detail/attendanceInfoDlg.vue'
|
||||||
|
import jhAttendanceDetailDialog from './detail/AttendanceDetailDialog.vue'
|
||||||
|
import jhJobWorkerDialog from './detail/JobWorkerDialog.vue'
|
||||||
import debounce from "lodash.debounce";
|
import debounce from "lodash.debounce";
|
||||||
import staffSurveyChart from "@/components/staffSurveyChart.vue";
|
import staffSurveyChart from "@/components/staffSurveyChart.vue";
|
||||||
export default {
|
export default {
|
||||||
components: { staffSurveyChart },
|
components: { staffSurveyChart,attendanceInfoDlg,jhAttendanceDetailDialog,jhJobWorkerDialog },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dpi: "",
|
dpi: "",
|
||||||
|
@ -185,6 +123,36 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
doShowAttendanceDetail() {
|
||||||
|
if (this.prjInfo.vendorsCode == "uni") {
|
||||||
|
this.$refs.attDlg.showDialog({
|
||||||
|
prjInfo: this.prjInfo,
|
||||||
|
attendanceData: this.attendanceData,
|
||||||
|
type: this.attendanceNav,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
let data = {
|
||||||
|
deptId: this.prjInfo.deptId || 0,
|
||||||
|
projectId: this.prjInfo.id || 0,
|
||||||
|
attendanceTime: this.$dt(new Date()).format("YYYY-MM-DD"),
|
||||||
|
};
|
||||||
|
if (this.attendanceNav === 1) {
|
||||||
|
this.$refs.jhAttDlg.showDialog(data);
|
||||||
|
} else {
|
||||||
|
this.$refs.jhJobWorkerDlg.showDialog({
|
||||||
|
...data,
|
||||||
|
type: this.attendanceNav,
|
||||||
|
total: this.attendanceTotal,
|
||||||
|
datas: this.attendanceData.map((it) => {
|
||||||
|
return {
|
||||||
|
text: it.text.replace("总包人员", "101").replace("监理人员", "102").replace("劳务人员", "103"),
|
||||||
|
cnt: it.value,
|
||||||
|
};
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
changeChart4(opt) {
|
changeChart4(opt) {
|
||||||
if (this.$dpi() == "1K") {
|
if (this.$dpi() == "1K") {
|
||||||
opt.legend[0].left = 200;
|
opt.legend[0].left = 200;
|
||||||
|
@ -246,13 +214,22 @@ export default {
|
||||||
if (!this.selProject) {
|
if (!this.selProject) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.$api.project.getProjectInfo(this.selProject.id).then((d) => {
|
||||||
|
this.prjInfo = d.data || {};
|
||||||
|
if (this.prjInfo.vendorsCode == "jgw") {
|
||||||
|
this.prjInfo.vendorsCode = "uni";
|
||||||
|
}
|
||||||
|
this.doInit();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
doInit() {
|
||||||
this.loadAttendanceData();
|
this.loadAttendanceData();
|
||||||
this.getGroupByWorker();
|
this.getGroupByWorker();
|
||||||
this.groupAttendanceLastWeek();
|
this.groupAttendanceLastWeek();
|
||||||
this.getWorkerCountGroupByType();
|
this.getWorkerCountGroupByType();
|
||||||
this.getRealAttendance();
|
this.getRealAttendance();
|
||||||
this.getAttendanceAlert();
|
this.getAttendanceAlert();
|
||||||
setTimeout(this.init, 3 * 60 * 1000);
|
setTimeout(this.doInit, 3 * 60 * 1000);
|
||||||
},
|
},
|
||||||
resize() {
|
resize() {
|
||||||
let is1K = this.$dpi() == "1K";
|
let is1K = this.$dpi() == "1K";
|
||||||
|
@ -262,93 +239,77 @@ export default {
|
||||||
this.chartKey++;
|
this.chartKey++;
|
||||||
},
|
},
|
||||||
getAttendanceAlert() {
|
getAttendanceAlert() {
|
||||||
this.$api.labor
|
this.$api.labor.getAttendanceAlert(this.selProject.vendorsCode, this.selProject.id).then((d) => {
|
||||||
.getAttendanceAlert(this.selProject.vendorsCode, this.selProject.id)
|
this.alertList = d.data.map((it) => {
|
||||||
.then((d) => {
|
return it;
|
||||||
this.alertList = d.data.map((it) => {
|
|
||||||
return it;
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
getRealAttendance() {
|
getRealAttendance() {
|
||||||
this.$api.labor
|
this.$api.labor.getRealAttendance(this.selProject.vendorsCode, this.selProject.id).then((d) => {
|
||||||
.getRealAttendance(this.selProject.vendorsCode, this.selProject.id)
|
this.realList = d.data.map((it) => {
|
||||||
.then((d) => {
|
it.name = it.workerName || it.userName;
|
||||||
this.realList = d.data.map((it) => {
|
it.workType = it.workTypeName || it.subDeptGroupName;
|
||||||
it.name = it.workerName || it.userName;
|
it.img = it.scanPhoto || it.inPhoto || it.outPhoto;
|
||||||
it.workType = it.workTypeName || it.subDeptGroupName;
|
if (it.outTime) {
|
||||||
it.img = it.scanPhoto || it.inPhoto || it.outPhoto;
|
it.inOutType = "out";
|
||||||
if (it.outTime) {
|
it.inoutDate = it.outTime;
|
||||||
it.inOutType = "out";
|
} else if (it.inTime) {
|
||||||
it.inoutDate = it.outTime;
|
it.inOutType = "in";
|
||||||
} else if (it.inTime) {
|
it.inoutDate = it.inTime;
|
||||||
it.inOutType = "in";
|
} else if (it.attendanceOutTime) {
|
||||||
it.inoutDate = it.inTime;
|
it.inOutType = "out";
|
||||||
} else if (it.attendanceOutTime) {
|
it.inoutDate = it.attendanceOutTime;
|
||||||
it.inOutType = "out";
|
} else {
|
||||||
it.inoutDate = it.attendanceOutTime;
|
it.inOutType = "in";
|
||||||
} else {
|
it.inoutDate = it.attendanceTime;
|
||||||
it.inOutType = "in";
|
}
|
||||||
it.inoutDate = it.attendanceTime;
|
return it;
|
||||||
}
|
|
||||||
return it;
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
getWorkerCountGroupByType() {
|
getWorkerCountGroupByType() {
|
||||||
this.$api.labor
|
this.$api.labor.getWorkerCountGroupByType(this.selProject.vendorsCode, this.selProject.id).then((d) => {
|
||||||
.getWorkerCountGroupByType(
|
let sum = 0;
|
||||||
this.selProject.vendorsCode,
|
d.data.forEach((item) => {
|
||||||
this.selProject.id
|
item.id = item.id || item.comId;
|
||||||
)
|
sum += item.id ? item.id : 0;
|
||||||
.then((d) => {
|
|
||||||
let sum = 0;
|
|
||||||
d.data.forEach((item) => {
|
|
||||||
item.id = item.id || item.comId;
|
|
||||||
sum += item.id ? item.id : 0;
|
|
||||||
});
|
|
||||||
this.workerTotal = sum;
|
|
||||||
this.workerGroupList = d.data.map((item) => {
|
|
||||||
return {
|
|
||||||
name: item.workTypeName || item.craftPostName,
|
|
||||||
value: item.id ? item.id : 0,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
this.chartKey++;
|
|
||||||
});
|
});
|
||||||
|
this.workerTotal = sum;
|
||||||
|
this.workerGroupList = d.data.map((item) => {
|
||||||
|
return {
|
||||||
|
name: item.workTypeName || item.craftPostName,
|
||||||
|
value: item.id ? item.id : 0,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
this.chartKey++;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
groupAttendanceLastWeek() {
|
groupAttendanceLastWeek() {
|
||||||
this.$api.labor
|
this.$api.labor.groupAttendanceLastWeek(this.selProject.vendorsCode, this.selProject.id).then((d) => {
|
||||||
.groupAttendanceLastWeek(
|
this.weekData = d.data.map((it) => {
|
||||||
this.selProject.vendorsCode,
|
return {
|
||||||
this.selProject.id
|
name: it.dt.substring(5).replace("-", "."),
|
||||||
)
|
value: it.cnt,
|
||||||
.then((d) => {
|
};
|
||||||
this.weekData = d.data.map((it) => {
|
|
||||||
return {
|
|
||||||
name: it.dt.substring(5).replace("-", "."),
|
|
||||||
value: it.cnt,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
this.chartKey++;
|
|
||||||
});
|
});
|
||||||
|
this.chartKey++;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
getGroupByWorker() {
|
getGroupByWorker() {
|
||||||
this.$api.labor
|
this.$api.labor.groupByWorker(this.selProject.vendorsCode, this.selProject.id).then((d) => {
|
||||||
.groupByWorker(this.selProject.vendorsCode, this.selProject.id)
|
this.nativeList = (d.data.native || []).map((it) => {
|
||||||
.then((d) => {
|
it.name = it.nativePlace;
|
||||||
this.nativeList = (d.data.native || []).map((it) => {
|
it.value = it.count;
|
||||||
it.name = it.nativePlace;
|
return it;
|
||||||
it.value = it.count;
|
|
||||||
return it;
|
|
||||||
});
|
|
||||||
this.ageList = (d.data.age || []).map((it) => {
|
|
||||||
it.name = ["", "18~30", "30~40", "40~55", "55岁以上"][it.age];
|
|
||||||
it.value = it.count;
|
|
||||||
return it;
|
|
||||||
});
|
|
||||||
this.chartKey++;
|
|
||||||
});
|
});
|
||||||
|
this.ageList = (d.data.age || []).map((it) => {
|
||||||
|
it.name = ["", "18~30", "30~40", "40~55", "55岁以上"][it.age];
|
||||||
|
it.value = it.count;
|
||||||
|
return it;
|
||||||
|
});
|
||||||
|
this.chartKey++;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
renderChart2(opt) {
|
renderChart2(opt) {
|
||||||
let is1K = this.$dpi() == "1K";
|
let is1K = this.$dpi() == "1K";
|
||||||
|
@ -812,7 +773,7 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.real-item-img {
|
.real-item-img {
|
||||||
height: calc(100% - 60px);
|
height: calc(100% - 80px);
|
||||||
padding: 0px 40px;
|
padding: 0px 40px;
|
||||||
.el-image__inner {
|
.el-image__inner {
|
||||||
width: unset;
|
width: unset;
|
||||||
|
|
|
@ -399,15 +399,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="groupAllByComany" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
<select id="groupAllByComany" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
||||||
select ct.sub_type companyTypeId,count(1) id
|
select g.companyTypeId,count(1) id
|
||||||
from sur_project_attendance_user u, attendance_cfg c,
|
from sur_project_attendance_user u, attendance_cfg c,view_sur_project_attendance_group g,
|
||||||
view_sur_project_attendance_group g,
|
pro_project_info sp
|
||||||
pro_project_info sp,
|
where u.cfgid=c.id and u.groupId=g.teamId and u.state=#{id} and c.project_id = sp.id
|
||||||
sur_project_attendance_company_type ct
|
|
||||||
where u.cfgid=c.id and u.companyId=g.companyId and u.state=0 and c.project_id = sp.id
|
|
||||||
and u.vendors_code=ct.vendors_code and g.companyTypeId=ct.type_id
|
|
||||||
and sp.is_Del=0
|
and sp.is_Del=0
|
||||||
and ct.sub_type in (0,1,2,3,4,5,6,8)
|
and g.companyTypeId in (0,1,2,3,4,5,6,8)
|
||||||
<if test="projectId!=null and projectId>0">
|
<if test="projectId!=null and projectId>0">
|
||||||
and c.project_id=#{projectId}
|
and c.project_id=#{projectId}
|
||||||
</if>
|
</if>
|
||||||
|
@ -421,7 +418,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
group by ct.sub_type
|
group by g.companyTypeId
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getHuazhuPage" parameterType="SurProjectAttendanceData" resultType="Long">
|
<select id="getHuazhuPage" parameterType="SurProjectAttendanceData" resultType="Long">
|
||||||
|
|
|
@ -65,7 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
u.teamId,u.teamName,u.enterType,u.is_del,u.create_by,u.create_time,u.update_by,u.update_time,
|
u.teamId,u.teamName,u.enterType,u.is_del,u.create_by,u.create_time,u.update_by,u.update_time,
|
||||||
c.project_id,c.dept_id,u.companyName,u.workTypeName,g.teamname groupName,g.companyName remark
|
c.project_id,c.dept_id,u.companyName,u.workTypeName,g.teamname groupName,g.companyName remark
|
||||||
FROM sur_project_attendance_user u,attendance_cfg c,sur_project_attendance_group g
|
FROM sur_project_attendance_user u,attendance_cfg c,sur_project_attendance_group g
|
||||||
WHERE u.cfgid=c.id AND g.companyid=u.companyid AND u.vendors_code='jgw'
|
WHERE u.cfgid=c.id AND u.groupId=g.teamId AND u.vendors_code='jgw'
|
||||||
<if test="companyTypeId!=null">
|
<if test="companyTypeId!=null">
|
||||||
<if test="companyTypeId>100">
|
<if test="companyTypeId>100">
|
||||||
<if test="companyTypeId==101">
|
<if test="companyTypeId==101">
|
||||||
|
@ -289,7 +289,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
select u.companyId,u.companyName,u.`name`,u.recentPhoto,u.gender,u.birthDate,u.ethnic,u.nativePlace,u.phone,
|
select u.companyId,u.companyName,u.`name`,u.recentPhoto,u.gender,u.birthDate,u.ethnic,u.nativePlace,u.phone,
|
||||||
u.workTypeName,u.specWorkType,u.groupName,g.companyTypeId,u.workTypeCode
|
u.workTypeName,u.specWorkType,u.groupName,g.companyTypeId,u.workTypeCode
|
||||||
from sur_project_attendance_user u
|
from sur_project_attendance_user u
|
||||||
left join sur_project_attendance_group g on u.companyId = g.companyId and g.cfgid = u.cfgid
|
left join sur_project_attendance_group g on u.groupId=g.teamId and g.cfgid = u.cfgid
|
||||||
where u.cfgid=#{cfgid} and u.workerId=#{workerId}
|
where u.cfgid=#{cfgid} and u.workerId=#{workerId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -297,7 +297,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
select u.companyId,g.companyName,u.`name`,u.recentPhoto,u.gender,u.birthDate,u.ethnic,u.nativePlace,u.phone,
|
select u.companyId,g.companyName,u.`name`,u.recentPhoto,u.gender,u.birthDate,u.ethnic,u.nativePlace,u.phone,
|
||||||
u.workTypeName,u.specWorkType,u.groupName,g.companyTypeId,u.workTypeCode
|
u.workTypeName,u.specWorkType,u.groupName,g.companyTypeId,u.workTypeCode
|
||||||
from sur_project_attendance_user u
|
from sur_project_attendance_user u
|
||||||
left join sur_project_attendance_group g on u.groupId = g.serverid and g.cfgid = u.cfgid
|
left join sur_project_attendance_group g on u.groupId=g.teamId and g.cfgid = u.cfgid
|
||||||
where u.cfgid=#{cfgid} and u.workerId=#{workerId} ORDER BY u.id desc LIMIT 1
|
where u.cfgid=#{cfgid} and u.workerId=#{workerId} ORDER BY u.id desc LIMIT 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -654,7 +654,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
b.project_id,b.dept_id,u.companyName,u.workTypeName,u.groupName,
|
b.project_id,b.dept_id,u.companyName,u.workTypeName,u.groupName,
|
||||||
b.project_id,b.dept_id, g.teamname remark,g.companyName degreeName
|
b.project_id,b.dept_id, g.teamname remark,g.companyName degreeName
|
||||||
FROM sur_project_attendance_user u,attendance_cfg b,view_sur_project_attendance_group g,pro_project_info sp
|
FROM sur_project_attendance_user u,attendance_cfg b,view_sur_project_attendance_group g,pro_project_info sp
|
||||||
WHERE u.cfgid=b.id and u.state=0 and u.companyId=g.companyId and sp.is_Del=0 and b.project_id = sp.id
|
WHERE u.cfgid=b.id and u.state=0 and u.groupId=g.teamId and sp.is_Del=0 and b.project_id = sp.id
|
||||||
<if test="id==101">
|
<if test="id==101">
|
||||||
and g.companyTypeId in (1,6)
|
and g.companyTypeId in (1,6)
|
||||||
</if>
|
</if>
|
||||||
|
@ -688,7 +688,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
b.project_id,b.dept_id,u.companyName,u.workTypeName,u.groupName,
|
b.project_id,b.dept_id,u.companyName,u.workTypeName,u.groupName,
|
||||||
b.project_id,b.dept_id, g.teamname remark,g.companyName degreeName,g.companyTypeId
|
b.project_id,b.dept_id, g.teamname remark,g.companyName degreeName,g.companyTypeId
|
||||||
FROM sur_project_attendance_user u,attendance_cfg b,view_sur_project_attendance_group g,pro_project_info sp
|
FROM sur_project_attendance_user u,attendance_cfg b,view_sur_project_attendance_group g,pro_project_info sp
|
||||||
WHERE u.cfgid=b.id and u.companyId=g.companyId and sp.is_Del=0 and b.project_id = sp.id
|
WHERE u.cfgid=b.id and u.groupId=g.teamId and sp.is_Del=0 and b.project_id = sp.id
|
||||||
<if test="companyTypeId==101">
|
<if test="companyTypeId==101">
|
||||||
and g.companyTypeId in (1,6)
|
and g.companyTypeId in (1,6)
|
||||||
</if>
|
</if>
|
||||||
|
@ -710,7 +710,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="groupByWorkerOnDutyByDept" parameterType="SurProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
|
<select id="groupByWorkerOnDutyByDept" parameterType="SurProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
|
||||||
SELECT p.id, p.project_Name NAME,c.dept_name groupName,g.companyTypeId companyId,COUNT(1) cfgid
|
SELECT p.id, p.project_Name NAME,c.dept_name groupName,g.companyTypeId companyId,COUNT(1) cfgid
|
||||||
FROM sur_project_attendance_user u,attendance_cfg b,view_sur_project_attendance_group g,pro_project_info p,sys_dept c
|
FROM sur_project_attendance_user u,attendance_cfg b,view_sur_project_attendance_group g,pro_project_info p,sys_dept c
|
||||||
where u.cfgid=b.id and u.state=0 and u.companyId=g.companyId and b.project_id=p.id and c.dept_id=b.dept_id
|
where u.cfgid=b.id and u.state=0 and u.groupId=g.teamId and b.project_id=p.id and c.dept_id=b.dept_id
|
||||||
and p.is_Del=0
|
and p.is_Del=0
|
||||||
and g.companyTypeId in (1,6,0,2,3,4,5,8)
|
and g.companyTypeId in (1,6,0,2,3,4,5,8)
|
||||||
<if test="deptId!=null and deptId>0">
|
<if test="deptId!=null and deptId>0">
|
||||||
|
@ -760,7 +760,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="groupByWorkerByDept" parameterType="SurProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
|
<select id="groupByWorkerByDept" parameterType="SurProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
|
||||||
SELECT p.id, p.project_Name NAME,c.dept_name groupName,g.companyTypeId companyId,COUNT(1) cfgid
|
SELECT p.id, p.project_Name NAME,c.dept_name groupName,g.companyTypeId companyId,COUNT(1) cfgid
|
||||||
FROM sur_project_attendance_user u,attendance_cfg b,view_sur_project_attendance_group g,pro_project_info p,sys_dept c
|
FROM sur_project_attendance_user u,attendance_cfg b,view_sur_project_attendance_group g,pro_project_info p,sys_dept c
|
||||||
where u.cfgid=b.id and u.state= #{state} and u.companyId=g.companyId and b.project_id=p.id and c.dept_id=b.dept_id
|
where u.cfgid=b.id and u.state= #{state} and u.groupId=g.teamId and b.project_id=p.id and c.dept_id=b.dept_id
|
||||||
and p.is_Del=0
|
and p.is_Del=0
|
||||||
and g.companyTypeId in (1,6,0,2,3,4,5,8)
|
and g.companyTypeId in (1,6,0,2,3,4,5,8)
|
||||||
<if test="deptId!=null and deptId>0">
|
<if test="deptId!=null and deptId>0">
|
||||||
|
@ -786,7 +786,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
b.project_id,b.dept_id,u.companyName,u.workTypeName,u.groupName,
|
b.project_id,b.dept_id,u.companyName,u.workTypeName,u.groupName,
|
||||||
g.teamname remark,g.companyName degreeName
|
g.teamname remark,g.companyName degreeName
|
||||||
FROM sur_project_attendance_user u,attendance_cfg b,view_sur_project_attendance_group g,pro_project_info sp
|
FROM sur_project_attendance_user u,attendance_cfg b,view_sur_project_attendance_group g,pro_project_info sp
|
||||||
WHERE u.cfgid=b.id and u.state=#{state} and u.companyId=g.companyId and sp.is_Del=0 and b.project_id = sp.id
|
WHERE u.cfgid=b.id and u.state=#{state} and u.groupId=g.teamId and sp.is_Del=0 and b.project_id = sp.id
|
||||||
<if test="id==101">
|
<if test="id==101">
|
||||||
and g.companyTypeId in (1,6)
|
and g.companyTypeId in (1,6)
|
||||||
</if>
|
</if>
|
||||||
|
|
|
@ -205,7 +205,7 @@ public class AttendanceSzjTask {
|
||||||
user.setExitDate(StringUtils.isEmpty(tmp)?null:DateUtil.formatDateTime( DateUtil.parse(tmp)));
|
user.setExitDate(StringUtils.isEmpty(tmp)?null:DateUtil.formatDateTime( DateUtil.parse(tmp)));
|
||||||
user.setCompanyId(jo.getString("enterpriseId"));
|
user.setCompanyId(jo.getString("enterpriseId"));
|
||||||
user.setCompanyName(jo.getString("enterpriseName"));
|
user.setCompanyName(jo.getString("enterpriseName"));
|
||||||
user.setTeamId(jo.getInteger("roleType"));
|
user.setTeamId(jo.getInteger("id"));
|
||||||
user.setIdCardNo(jo.getString("idCardNo"));
|
user.setIdCardNo(jo.getString("idCardNo"));
|
||||||
user.setIdTypeName(jo.getString("idTypeName"));
|
user.setIdTypeName(jo.getString("idTypeName"));
|
||||||
user.setTeamName(jo.getString("role"));
|
user.setTeamName(jo.getString("role"));
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.yanzhu.manage.controller;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
|
import com.yanzhu.common.core.web.controller.BaseController;
|
||||||
|
import com.yanzhu.common.core.web.domain.AjaxResult;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考勤推送服务
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/attendancePost")
|
||||||
|
public class AttendancePostController extends BaseController {
|
||||||
|
|
||||||
|
@PostMapping("/add")
|
||||||
|
public AjaxResult doAddAttendance(@RequestBody JSONObject json){
|
||||||
|
System.out.println(json.toString());
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>Document</title>
|
||||||
|
<script src="/cdn/jquery/3.5.1/jquery.min.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
haha
|
||||||
|
<script>
|
||||||
|
window.addEventListener(
|
||||||
|
"message",
|
||||||
|
(data) => {
|
||||||
|
console.log("iframe->", data);
|
||||||
|
let postData={data:data.data};
|
||||||
|
|
||||||
|
let url = "http://localhost/dev-api/manage/attendancePost/add";
|
||||||
|
$.post({
|
||||||
|
url: url,
|
||||||
|
contentType: "application/json", // 设置内容类型为 JSON
|
||||||
|
data: JSON.stringify(postData), // 将数据转换为 JSON 字符串
|
||||||
|
success: function (response) {
|
||||||
|
// 处理成功响应
|
||||||
|
console.log("成功响应:", response);
|
||||||
|
},
|
||||||
|
error: function (xhr, status, error) {
|
||||||
|
// 处理错误响应
|
||||||
|
console.error("错误响应:", error);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
false
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue