修改考勤人员查询逻辑
parent
2c11fb72cb
commit
e34ff19559
|
@ -631,9 +631,9 @@ export default {
|
|||
}
|
||||
this.laborPersonnelTotal = 0
|
||||
this.laborPersonnelData = [
|
||||
{ text: '劳务人员', value: func(['0', '2', '3', '4', '5']) },
|
||||
{ text: '监理人员', value: func(['8']) },
|
||||
{ text: '总包人员', value: func(['1', '6']) },
|
||||
{ text: '劳务人员', value: func(['4', '5']) },
|
||||
{ text: '监理人员', value: func(['1']) },
|
||||
{ text: '总包人员', value: func(['1']) },
|
||||
]
|
||||
this.laborPersonnelData.forEach((it) => {
|
||||
this.laborPersonnelTotal += it.value
|
||||
|
|
|
@ -1275,9 +1275,9 @@ export default {
|
|||
|
||||
this.laborPersonnelTotal = 0;
|
||||
this.laborPersonnelData = [
|
||||
{ text: "劳务人员", value: func(["0", "2", "3", "4", "5"]) },
|
||||
{ text: "监理人员", value: func(["8"]) },
|
||||
{ text: "总包人员", value: func(["1", "6"]) },
|
||||
{ text: "劳务人员", value: func(["4", "5"]) },
|
||||
{ text: "监理人员", value: func(["2"]) },
|
||||
{ text: "总包人员", value: func(["1"]) },
|
||||
];
|
||||
this.laborPersonnelData.forEach((it) => {
|
||||
this.laborPersonnelTotal += it.value;
|
||||
|
|
|
@ -690,7 +690,7 @@ export default {
|
|||
}
|
||||
|
||||
this.laborPersonnelTotal = 0;
|
||||
this.laborPersonnelData = [{ text: "劳务人员", value: func(["0", "2", "3", "4", "5"]) }, { text: "监理人员", value: func(["8"]) }, { text: "总包人员", value: func(["1", "6"]) }];
|
||||
this.laborPersonnelData = [{ text: "劳务人员", value: func(["4", "5"]) }, { text: "监理人员", value: func(["2"]) }, { text: "总包人员", value: func(["1"]) }];
|
||||
this.laborPersonnelData.forEach(it => {
|
||||
this.laborPersonnelTotal += it.value;
|
||||
})
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="unitList" class="mytable" height="40vh"
|
||||
<el-table :data="unitList" class="mytable" height="40vh"
|
||||
style="width: 100%;background: transparent;" ref="tbUnit">
|
||||
<el-table-column label="单位类型" align="center" prop="type" />
|
||||
<el-table-column label="单位" align="center" prop="deptName" />
|
||||
|
|
|
@ -695,9 +695,9 @@ export default {
|
|||
|
||||
this.attendanceTotal = 0
|
||||
this.attendanceData = [
|
||||
{ text: '劳务人员', value: func(['0', '2', '3', '4', '5']) },
|
||||
{ text: '监理人员', value: func(['8']) },
|
||||
{ text: '总包人员', value: func(['1', '6']) },
|
||||
{ text: '劳务人员', value: func(['4', '5']) },
|
||||
{ text: '监理人员', value: func(['2']) },
|
||||
{ text: '总包人员', value: func(['1']) },
|
||||
]
|
||||
this.attendanceData.forEach((it) => {
|
||||
this.attendanceTotal += it.value
|
||||
|
|
|
@ -504,9 +504,9 @@ export default {
|
|||
|
||||
this.attendanceTotal = 0;
|
||||
this.attendanceData = [
|
||||
{ text: "劳务人员", value: func(["0", "2", "3", "4", "5"]) },
|
||||
{ text: "监理人员", value: func(["8"]) },
|
||||
{ text: "总包人员", value: func(["1", "6"]) },
|
||||
{ text: "劳务人员", value: func(["4", "5"]) },
|
||||
{ text: "监理人员", value: func(["2"]) },
|
||||
{ text: "总包人员", value: func(["1"]) },
|
||||
];
|
||||
this.attendanceData.forEach((it) => {
|
||||
this.attendanceTotal += it.value;
|
||||
|
|
|
@ -118,13 +118,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="companyTypeId!=null">
|
||||
<if test="companyTypeId>100">
|
||||
<if test="companyTypeId==101">
|
||||
and companyTypeId in (1,6)
|
||||
and companyTypeId in (1)
|
||||
</if>
|
||||
<if test="companyTypeId==102">
|
||||
and companyTypeId =8
|
||||
and companyTypeId in (2)
|
||||
</if>
|
||||
<if test="companyTypeId==103">
|
||||
and companyTypeId in (0,2,3,4,5)
|
||||
and companyTypeId in (4,5)
|
||||
</if>
|
||||
</if>
|
||||
<if test="companyTypeId <100">
|
||||
|
@ -158,13 +158,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="companyTypeId!=null">
|
||||
<if test="companyTypeId>100">
|
||||
<if test="companyTypeId==101">
|
||||
and companyTypeId in (1,6)
|
||||
and companyTypeId in (1)
|
||||
</if>
|
||||
<if test="companyTypeId==102">
|
||||
and companyTypeId =8
|
||||
and companyTypeId in (2)
|
||||
</if>
|
||||
<if test="companyTypeId==103">
|
||||
and companyTypeId in (0,2,3,4,5)
|
||||
and companyTypeId in (4,5)
|
||||
</if>
|
||||
</if>
|
||||
<if test="companyTypeId <100">
|
||||
|
@ -357,7 +357,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
<if test="projectId!=null and projectId>0"> and project_id=#{projectId}</if>
|
||||
group by workerId )
|
||||
and companyTypeId in (1,2,3,4,5,6,8) group by companyTypeId
|
||||
and companyTypeId in (1,2,4,5) group by companyTypeId
|
||||
</select>
|
||||
<select id="groupByComany" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
||||
select g.companyTypeId,count(1) id from sur_project_attendance_user u, attendance_cfg c,view_sur_project_attendance_group g
|
||||
|
@ -381,7 +381,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
)
|
||||
)
|
||||
and g.companyTypeId in (1,2,3,4,5,6,8)
|
||||
and g.companyTypeId in (1,2,4,5)
|
||||
|
||||
<if test="projectId!=null and projectId>0">
|
||||
and c.project_id=#{projectId}
|
||||
|
@ -404,7 +404,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
pro_project_info sp
|
||||
where u.cfgid=c.id and u.groupId=g.teamId and u.state=#{id} and c.project_id = sp.id
|
||||
and sp.is_Del=0
|
||||
and g.companyTypeId in (0,1,2,3,4,5,6,8)
|
||||
and g.companyTypeId in (1,2,4,5)
|
||||
<if test="projectId!=null and projectId>0">
|
||||
and c.project_id=#{projectId}
|
||||
</if>
|
||||
|
@ -472,13 +472,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="companyTypeId!=null">
|
||||
<if test="companyTypeId>100">
|
||||
<if test="companyTypeId==101">
|
||||
and companyTypeId in (1,6)
|
||||
and companyTypeId in (1)
|
||||
</if>
|
||||
<if test="companyTypeId==102">
|
||||
and companyTypeId =8
|
||||
and companyTypeId in (2)
|
||||
</if>
|
||||
<if test="companyTypeId==103">
|
||||
and companyTypeId in (0,2,3,4,5)
|
||||
and companyTypeId in (4,5)
|
||||
</if>
|
||||
</if>
|
||||
<if test="companyTypeId <100">
|
||||
|
@ -540,13 +540,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and ady.projectId=#{projectId}
|
||||
</if>
|
||||
<if test="id==1">
|
||||
and ady.companyTypeId in (1,6)
|
||||
and ady.companyTypeId in (1)
|
||||
</if>
|
||||
<if test="id==2">
|
||||
and ady.companyTypeId in (0,2,3,4,5)
|
||||
and ady.companyTypeId in (4,5)
|
||||
</if>
|
||||
<if test="id==8">
|
||||
and ady.companyTypeId =8
|
||||
and ady.companyTypeId in (2)
|
||||
</if>
|
||||
<if test="deptId!=null and deptId>0">
|
||||
and sp.dis_dept_id=#{deptId}
|
||||
|
@ -565,13 +565,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select ady.* from sur_project_attendance_data_${year} ady
|
||||
where ady.cfgid in (select cfg.id from attendance_cfg cfg where cfg.project_id=#{projectId} and cfg.is_del=0)
|
||||
<if test="companyTypeId==101">
|
||||
and ady.companyTypeId in (1,6)
|
||||
and ady.companyTypeId in (1)
|
||||
</if>
|
||||
<if test="companyTypeId==103">
|
||||
and ady.companyTypeId in (0,2,3,4,5)
|
||||
and ady.companyTypeId in (4,5)
|
||||
</if>
|
||||
<if test="companyTypeId==102">
|
||||
and ady.companyTypeId =8
|
||||
and ady.companyTypeId in (2)
|
||||
</if>
|
||||
<if test="workerId != null and workerId != ''"> and ady.workerId = #{workerId}</if>
|
||||
<if test="workerName != null and workerName != ''"> and ady.workerName like concat('%', #{workerName}, '%')</if>
|
||||
|
@ -609,7 +609,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from sur_project_attendance_user u
|
||||
left join view_sur_project_attendance_group g on g.cfgid = u.cfgid and u.companyId=g.companyId
|
||||
where u.cfgid in (select cfg.id from attendance_cfg cfg where cfg.project_id=#{projectId} and cfg.is_del=0)
|
||||
and g.companyTypeId in (0,1,2,3,4,5,6,8)
|
||||
and g.companyTypeId in (1,2,4,5)
|
||||
and u.state=0
|
||||
group by g.companyTypeId
|
||||
UNION ALL
|
||||
|
@ -617,7 +617,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from sur_project_attendance_user u
|
||||
left join view_sur_project_attendance_group g on g.cfgid = u.cfgid and u.companyId=g.companyId
|
||||
where u.cfgid in (select cfg.id from attendance_cfg cfg where cfg.project_id=#{projectId} and cfg.is_del=0)
|
||||
and g.companyTypeId in (0,1,2,3,4,5,6,8)
|
||||
and g.companyTypeId in (1,2,4,5)
|
||||
and u.state=1
|
||||
group by g.companyTypeId
|
||||
UNION ALL
|
||||
|
|
|
@ -69,13 +69,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="companyTypeId!=null">
|
||||
<if test="companyTypeId>100">
|
||||
<if test="companyTypeId==101">
|
||||
and g.companyTypeId in (1,6)
|
||||
and g.companyTypeId in (1)
|
||||
</if>
|
||||
<if test="companyTypeId==102">
|
||||
and g.companyTypeId =8
|
||||
and g.companyTypeId in (2)
|
||||
</if>
|
||||
<if test="companyTypeId==103">
|
||||
and g.companyTypeId in (0,2,3,4,5)
|
||||
and g.companyTypeId in (4,5)
|
||||
</if>
|
||||
</if>
|
||||
<if test="companyTypeId <100">
|
||||
|
@ -172,13 +172,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="companyTypeId!=null">
|
||||
<if test="companyTypeId>100">
|
||||
<if test="companyTypeId==101">
|
||||
and companyTypeId in (1,6)
|
||||
and companyTypeId in (1)
|
||||
</if>
|
||||
<if test="companyTypeId==102">
|
||||
and companyTypeId =8
|
||||
and companyTypeId in (2)
|
||||
</if>
|
||||
<if test="companyTypeId==103">
|
||||
and companyTypeId in (0,2,3,4,5)
|
||||
and companyTypeId in (4,5)
|
||||
</if>
|
||||
</if>
|
||||
<if test="companyTypeId <100">
|
||||
|
@ -229,13 +229,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="companyTypeId!=null">
|
||||
<if test="companyTypeId>100">
|
||||
<if test="companyTypeId==101">
|
||||
and companyTypeId in (1,6)
|
||||
and companyTypeId in (1)
|
||||
</if>
|
||||
<if test="companyTypeId==102">
|
||||
and companyTypeId =8
|
||||
and companyTypeId in (2)
|
||||
</if>
|
||||
<if test="companyTypeId==103">
|
||||
and companyTypeId in (0,2,3,4,5)
|
||||
and companyTypeId in (4,5)
|
||||
</if>
|
||||
</if>
|
||||
<if test="companyTypeId <100">
|
||||
|
@ -537,13 +537,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
SELECT workerid FROM sur_project_attendance_data WHERE DATE(attendance_time)=CURDATE() group by workerid
|
||||
)
|
||||
<if test="id==1">
|
||||
and g.companyTypeId in (1,6)
|
||||
and g.companyTypeId in (1)
|
||||
</if>
|
||||
<if test="id==2">
|
||||
and g.companyTypeId in (0,2,3,4,5)
|
||||
and g.companyTypeId in (4,5)
|
||||
</if>
|
||||
<if test="id==8">
|
||||
and g.companyTypeId =8
|
||||
and g.companyTypeId in (2)
|
||||
</if>
|
||||
<if test="projectId!=null and projectId>0">
|
||||
and c.project_id=#{projectId}
|
||||
|
@ -570,13 +570,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
)
|
||||
|
||||
<if test="id==1">
|
||||
and g.companyTypeId in (1,6)
|
||||
and g.companyTypeId in (1)
|
||||
</if>
|
||||
<if test="id==2">
|
||||
and g.companyTypeId in (0,2,3,4,5)
|
||||
and g.companyTypeId in (4,5)
|
||||
</if>
|
||||
<if test="id==8">
|
||||
and g.companyTypeId =8
|
||||
and g.companyTypeId in (2)
|
||||
</if>
|
||||
<if test="projectId!=null and projectId>0">
|
||||
and c.project_id=#{projectId}
|
||||
|
@ -601,13 +601,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
)
|
||||
|
||||
<if test="id==1">
|
||||
and g.companyTypeId in (1,6)
|
||||
and g.companyTypeId in (1)
|
||||
</if>
|
||||
<if test="id==2">
|
||||
and g.companyTypeId in (0,2,3,4,5)
|
||||
and g.companyTypeId in (4,5)
|
||||
</if>
|
||||
<if test="id==8">
|
||||
and g.companyTypeId =8
|
||||
and g.companyTypeId in (2)
|
||||
</if>
|
||||
<if test="projectId!=null and projectId>0">
|
||||
and c.project_id=#{projectId}
|
||||
|
@ -656,13 +656,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
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.groupId=g.teamId and sp.is_Del=0 and b.project_id = sp.id
|
||||
<if test="id==101">
|
||||
and g.companyTypeId in (1,6)
|
||||
and g.companyTypeId in (1)
|
||||
</if>
|
||||
<if test="id==102">
|
||||
and g.companyTypeId =8
|
||||
and g.companyTypeId in (2)
|
||||
</if>
|
||||
<if test="id==103">
|
||||
and g.companyTypeId in (0,2,3,4,5)
|
||||
and g.companyTypeId in (4,5)
|
||||
</if>
|
||||
<if test="projectId!=null and projectId>0">
|
||||
and b.project_id=#{projectId}
|
||||
|
@ -690,13 +690,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
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.groupId=g.teamId and sp.is_Del=0 and b.project_id = sp.id
|
||||
<if test="companyTypeId==101">
|
||||
and g.companyTypeId in (1,6)
|
||||
and g.companyTypeId in (1)
|
||||
</if>
|
||||
<if test="companyTypeId==102">
|
||||
and g.companyTypeId =8
|
||||
and g.companyTypeId in (2)
|
||||
</if>
|
||||
<if test="companyTypeId==103">
|
||||
and g.companyTypeId in (0,2,3,4,5)
|
||||
and g.companyTypeId in (4,5)
|
||||
</if>
|
||||
<if test="projectId!=null and projectId>0">
|
||||
and b.project_id=#{projectId}
|
||||
|
@ -712,7 +712,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
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.groupId=g.teamId and b.project_id=p.id and c.dept_id=b.dept_id
|
||||
and p.is_Del=0
|
||||
and g.companyTypeId in (1,6,0,2,3,4,5,8)
|
||||
and g.companyTypeId in (1,2,4,5)
|
||||
<if test="deptId!=null and deptId>0">
|
||||
and p.dis_dept_id=#{deptId}
|
||||
</if>
|
||||
|
@ -732,7 +732,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from sur_project_attendance_user u
|
||||
left join view_sur_project_attendance_group g on g.cfgid = u.cfgid and u.companyId=g.companyId
|
||||
where u.cfgid in (select cfg.id from attendance_cfg cfg where cfg.project_id=#{projectId} and cfg.is_del=0)
|
||||
and g.companyTypeId in (0,1,2,3,4,5,6,8)
|
||||
and g.companyTypeId in (1,2,4,5)
|
||||
and u.state=0
|
||||
<if test="name != null and name != ''"> and u.name like concat('%', #{name}, '%')</if>
|
||||
group by g.companyTypeId
|
||||
|
@ -741,7 +741,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from sur_project_attendance_user u
|
||||
left join view_sur_project_attendance_group g on g.cfgid = u.cfgid and u.companyId=g.companyId
|
||||
where u.cfgid in (select cfg.id from attendance_cfg cfg where cfg.project_id=#{projectId} and cfg.is_del=0)
|
||||
and g.companyTypeId in (0,1,2,3,4,5,6,8)
|
||||
and g.companyTypeId in (1,2,4,5)
|
||||
and u.state=1
|
||||
<if test="name != null and name != ''"> and u.name like concat('%', #{name}, '%')</if>
|
||||
group by g.companyTypeId
|
||||
|
@ -752,7 +752,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from sur_project_attendance_user u
|
||||
left join view_sur_project_attendance_group g on g.cfgid = u.cfgid and u.companyId=g.companyId
|
||||
where u.cfgid in (select cfg.id from attendance_cfg cfg where cfg.project_id=#{projectId} and cfg.is_del=0)
|
||||
and g.companyTypeId in (0,1,2,3,4,5,6,8)
|
||||
and g.companyTypeId in (1,2,4,5)
|
||||
and u.state=0
|
||||
group by g.companyTypeId
|
||||
</select>
|
||||
|
@ -762,7 +762,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
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.groupId=g.teamId and b.project_id=p.id and c.dept_id=b.dept_id
|
||||
and p.is_Del=0
|
||||
and g.companyTypeId in (1,6,0,2,3,4,5,8)
|
||||
and g.companyTypeId in (1,2,4,5)
|
||||
<if test="deptId!=null and deptId>0">
|
||||
and p.dis_dept_id=#{deptId}
|
||||
</if>
|
||||
|
@ -788,13 +788,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
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.groupId=g.teamId and sp.is_Del=0 and b.project_id = sp.id
|
||||
<if test="id==101">
|
||||
and g.companyTypeId in (1,6)
|
||||
and g.companyTypeId in (1)
|
||||
</if>
|
||||
<if test="id==102">
|
||||
and g.companyTypeId =8
|
||||
and g.companyTypeId in (2)
|
||||
</if>
|
||||
<if test="id==103">
|
||||
and g.companyTypeId in (0,2,3,4,5)
|
||||
and g.companyTypeId in (4,5)
|
||||
</if>
|
||||
<if test="projectId!=null and projectId>0">
|
||||
and b.project_id=#{projectId}
|
||||
|
|
|
@ -45,17 +45,7 @@ public class SzjEnterpriseInfo {
|
|||
|
||||
public void setEnterpriseType(Long enterpriseType) {
|
||||
this.enterpriseType = enterpriseType;
|
||||
if(enterpriseType==null){
|
||||
companyTypeId = 0L;
|
||||
return;
|
||||
}
|
||||
if(enterpriseType==3L){
|
||||
companyTypeId = 1L;
|
||||
}else if(enterpriseType==1L){
|
||||
companyTypeId = 8L;
|
||||
}else{
|
||||
companyTypeId = 2L;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Long getCompanyTypeId() {
|
||||
|
|
|
@ -287,7 +287,7 @@ public class AttendanceSzjTask {
|
|||
group.setBizLicense(szjEnterpriseInfo!=null?szjEnterpriseInfo.getCreditCode():jo.getInteger("enterpriseId")+"");
|
||||
group.setCompanyId(jo.getInteger("enterpriseId")+"");
|
||||
group.setCompanyName(jo.getString("enterpriseName"));
|
||||
group.setCompanyTypeId(jo.getInteger("enterpriseType")+"");
|
||||
group.setCompanyTypeId(convertSubDeptType(jo.getInteger("enterpriseType")+""));
|
||||
group.setName(jo.getString("teamName"));
|
||||
group.setTeamId(jo.getLong("id"));
|
||||
group.setLeaderName(jo.getString("teamLeader"));
|
||||
|
|
|
@ -117,13 +117,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="companyTypeId!=null">
|
||||
<if test="companyTypeId>100">
|
||||
<if test="companyTypeId==101">
|
||||
and companyTypeId in (1,6)
|
||||
and companyTypeId in (1)
|
||||
</if>
|
||||
<if test="companyTypeId==102">
|
||||
and companyTypeId =8
|
||||
and companyTypeId in (2)
|
||||
</if>
|
||||
<if test="companyTypeId==103">
|
||||
and companyTypeId in (0,2,3,4,5)
|
||||
and companyTypeId in (4,5)
|
||||
</if>
|
||||
</if>
|
||||
<if test="companyTypeId <100">
|
||||
|
@ -157,13 +157,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="companyTypeId!=null">
|
||||
<if test="companyTypeId>100">
|
||||
<if test="companyTypeId==101">
|
||||
and companyTypeId in (1,6)
|
||||
and companyTypeId in (1)
|
||||
</if>
|
||||
<if test="companyTypeId==102">
|
||||
and companyTypeId =8
|
||||
and companyTypeId in (2)
|
||||
</if>
|
||||
<if test="companyTypeId==103">
|
||||
and companyTypeId in (0,2,3,4,5)
|
||||
and companyTypeId in (4,5)
|
||||
</if>
|
||||
</if>
|
||||
<if test="companyTypeId <100">
|
||||
|
@ -355,7 +355,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
<if test="projectId!=null and projectId>0"> and projectId=#{projectId}</if>
|
||||
group by workerId )
|
||||
and companyTypeId in (1,2,3,4,5,6,8) group by companyTypeId
|
||||
and companyTypeId in (1,2,4,5) group by companyTypeId
|
||||
</select>
|
||||
<select id="groupByComany" parameterType="QuartzProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
||||
select g.companyTypeId,count(1) id from sur_project_attendance_user u, attendance_cfg c,view_sur_project_attendance_group g
|
||||
|
@ -379,7 +379,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
)
|
||||
)
|
||||
and g.companyTypeId in (1,2,3,4,5,6,8)
|
||||
and g.companyTypeId in (1,2,4,5)
|
||||
|
||||
<if test="projectId!=null and projectId>0">
|
||||
and c.project_id=#{projectId}
|
||||
|
@ -402,7 +402,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
pro_project_info sp
|
||||
where u.cfgid=c.id and u.companyId=g.companyId and u.state=#{id} and c.project_id = sp.id
|
||||
and sp.is_Del=0
|
||||
and g.companyTypeId in (0,1,2,3,4,5,6,8)
|
||||
and g.companyTypeId in (1,2,4,5)
|
||||
<if test="projectId!=null and projectId>0">
|
||||
and c.project_id=#{projectId}
|
||||
</if>
|
||||
|
@ -458,13 +458,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and ady.projectId=#{projectId}
|
||||
</if>
|
||||
<if test="id==1">
|
||||
and ady.companyTypeId in (1,6)
|
||||
and ady.companyTypeId in (1)
|
||||
</if>
|
||||
<if test="id==2">
|
||||
and ady.companyTypeId in (0,2,3,4,5)
|
||||
and ady.companyTypeId in (4,5)
|
||||
</if>
|
||||
<if test="id==8">
|
||||
and ady.companyTypeId =8
|
||||
and ady.companyTypeId in (2)
|
||||
</if>
|
||||
<if test="deptId!=null and deptId>0">
|
||||
and sp.dis_dept_id=#{deptId}
|
||||
|
@ -483,13 +483,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select ady.* from sur_project_attendance_data_${year} ady
|
||||
where ady.cfgid in (select cfg.id from attendance_cfg cfg where cfg.project_id=#{projectId} and cfg.is_del=0)
|
||||
<if test="companyTypeId==101">
|
||||
and ady.companyTypeId in (1,6)
|
||||
and ady.companyTypeId in (1)
|
||||
</if>
|
||||
<if test="companyTypeId==103">
|
||||
and ady.companyTypeId in (0,2,3,4,5)
|
||||
and ady.companyTypeId in (4,5)
|
||||
</if>
|
||||
<if test="companyTypeId==102">
|
||||
and ady.companyTypeId =8
|
||||
and ady.companyTypeId in (2)
|
||||
</if>
|
||||
<if test="workerId != null and workerId != ''"> and ady.workerId = #{workerId}</if>
|
||||
<if test="workerName != null and workerName != ''"> and ady.workerName like concat('%', #{workerName}, '%')</if>
|
||||
|
@ -531,7 +531,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from sur_project_attendance_user u
|
||||
left join view_sur_project_attendance_group g on g.cfgid = u.cfgid and u.companyId=g.companyId
|
||||
where u.cfgid in (select cfg.id from attendance_cfg cfg where cfg.project_id=#{projectId} and cfg.is_del=0)
|
||||
and g.companyTypeId in (0,1,2,3,4,5,6,8)
|
||||
and g.companyTypeId in (1,2,4,5)
|
||||
and u.state=0
|
||||
group by g.companyTypeId
|
||||
UNION ALL
|
||||
|
@ -539,7 +539,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from sur_project_attendance_user u
|
||||
left join view_sur_project_attendance_group g on g.cfgid = u.cfgid and u.companyId=g.companyId
|
||||
where u.cfgid in (select cfg.id from attendance_cfg cfg where cfg.project_id=#{projectId} and cfg.is_del=0)
|
||||
and g.companyTypeId in (0,1,2,3,4,5,6,8)
|
||||
and g.companyTypeId in (1,2,4,5)
|
||||
and u.state=1
|
||||
group by g.companyTypeId
|
||||
UNION ALL
|
||||
|
|
|
@ -71,13 +71,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="companyTypeId!=null">
|
||||
<if test="companyTypeId>100">
|
||||
<if test="companyTypeId==101">
|
||||
and g.companyTypeId in (1,6)
|
||||
and g.companyTypeId in (1)
|
||||
</if>
|
||||
<if test="companyTypeId==102">
|
||||
and g.companyTypeId =8
|
||||
and g.companyTypeId in (2)
|
||||
</if>
|
||||
<if test="companyTypeId==103">
|
||||
and g.companyTypeId in (0,2,3,4,5)
|
||||
and g.companyTypeId in (4,5)
|
||||
</if>
|
||||
</if>
|
||||
<if test="companyTypeId <100">
|
||||
|
@ -174,13 +174,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="companyTypeId!=null">
|
||||
<if test="companyTypeId>100">
|
||||
<if test="companyTypeId==101">
|
||||
and companyTypeId in (1,6)
|
||||
and companyTypeId in (1)
|
||||
</if>
|
||||
<if test="companyTypeId==102">
|
||||
and companyTypeId =8
|
||||
and companyTypeId in (2)
|
||||
</if>
|
||||
<if test="companyTypeId==103">
|
||||
and companyTypeId in (0,2,3,4,5)
|
||||
and companyTypeId in (4,5)
|
||||
</if>
|
||||
</if>
|
||||
<if test="companyTypeId <100">
|
||||
|
@ -232,13 +232,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="companyTypeId!=null">
|
||||
<if test="companyTypeId>100">
|
||||
<if test="companyTypeId==101">
|
||||
and companyTypeId in (1,6)
|
||||
and companyTypeId in (1)
|
||||
</if>
|
||||
<if test="companyTypeId==102">
|
||||
and companyTypeId =8
|
||||
and companyTypeId in (2)
|
||||
</if>
|
||||
<if test="companyTypeId==103">
|
||||
and companyTypeId in (0,2,3,4,5)
|
||||
and companyTypeId in (4,5)
|
||||
</if>
|
||||
</if>
|
||||
<if test="companyTypeId <100">
|
||||
|
@ -406,8 +406,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="workerCategory != null">workerCategory = #{workerCategory},</if>
|
||||
<if test="qrCode != null">qrCode = #{qrCode},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="idCardNo != null">name = #{idCardNo},</if>
|
||||
<if test="idTypeName != null">name = #{idTypeName},</if>
|
||||
<if test="idCardNo != null">idCardNo = #{idCardNo},</if>
|
||||
<if test="idTypeName != null">idTypeName = #{idTypeName},</if>
|
||||
<if test="ethnic != null">ethnic = #{ethnic},</if>
|
||||
<if test="nativePlace != null">nativePlace = #{nativePlace},</if>
|
||||
<if test="gender != null">gender = #{gender},</if>
|
||||
|
@ -508,13 +508,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
SELECT workerid FROM sur_project_attendance_data WHERE DATE(attendance_time)=CURDATE() group by workerid
|
||||
)
|
||||
<if test="id==1">
|
||||
and g.companyTypeId in (1,6)
|
||||
and g.companyTypeId in (1)
|
||||
</if>
|
||||
<if test="id==2">
|
||||
and g.companyTypeId in (0,2,3,4,5)
|
||||
and g.companyTypeId in (4,5)
|
||||
</if>
|
||||
<if test="id==8">
|
||||
and g.companyTypeId =8
|
||||
and g.companyTypeId in (2)
|
||||
</if>
|
||||
<if test="projectId!=null and projectId>0">
|
||||
and c.project_id=#{projectId}
|
||||
|
@ -539,13 +539,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
)
|
||||
|
||||
<if test="id==1">
|
||||
and g.companyTypeId in (1,6)
|
||||
and g.companyTypeId in (1)
|
||||
</if>
|
||||
<if test="id==2">
|
||||
and g.companyTypeId in (0,2,3,4,5)
|
||||
and g.companyTypeId in (4,5)
|
||||
</if>
|
||||
<if test="id==8">
|
||||
and g.companyTypeId =8
|
||||
and g.companyTypeId in (2)
|
||||
</if>
|
||||
<if test="projectId!=null and projectId>0">
|
||||
and c.project_id=#{projectId}
|
||||
|
@ -594,13 +594,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
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
|
||||
<if test="id==101">
|
||||
and g.companyTypeId in (1,6)
|
||||
and g.companyTypeId in (1)
|
||||
</if>
|
||||
<if test="id==102">
|
||||
and g.companyTypeId =8
|
||||
and g.companyTypeId in (2)
|
||||
</if>
|
||||
<if test="id==103">
|
||||
and g.companyTypeId in (0,2,3,4,5)
|
||||
and g.companyTypeId in (4,5)
|
||||
</if>
|
||||
<if test="projectId!=null and projectId>0">
|
||||
and b.project_id=#{projectId}
|
||||
|
@ -628,13 +628,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
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
|
||||
<if test="companyTypeId==101">
|
||||
and g.companyTypeId in (1,6)
|
||||
and g.companyTypeId in (1)
|
||||
</if>
|
||||
<if test="companyTypeId==102">
|
||||
and g.companyTypeId =8
|
||||
and g.companyTypeId in (2)
|
||||
</if>
|
||||
<if test="companyTypeId==103">
|
||||
and g.companyTypeId in (0,2,3,4,5)
|
||||
and g.companyTypeId in (4,5)
|
||||
</if>
|
||||
<if test="projectId!=null and projectId>0">
|
||||
and b.project_id=#{projectId}
|
||||
|
@ -650,7 +650,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
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
|
||||
and p.is_Del=0
|
||||
and g.companyTypeId in (1,6,0,2,3,4,5,8)
|
||||
and g.companyTypeId in (1,2,4,5)
|
||||
<if test="deptId!=null and deptId>0">
|
||||
and p.dis_dept_id=#{deptId}
|
||||
</if>
|
||||
|
@ -670,7 +670,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from sur_project_attendance_user u
|
||||
left join view_sur_project_attendance_group g on g.cfgid = u.cfgid and u.companyId=g.companyId
|
||||
where u.cfgid in (select cfg.id from attendance_cfg cfg where cfg.project_id=#{projectId} and cfg.is_del=0)
|
||||
and g.companyTypeId in (0,1,2,3,4,5,6,8)
|
||||
and g.companyTypeId in (1,2,4,5)
|
||||
and u.state=0
|
||||
<if test="name != null and name != ''"> and u.name like concat('%', #{name}, '%')</if>
|
||||
group by g.companyTypeId
|
||||
|
@ -679,7 +679,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from sur_project_attendance_user u
|
||||
left join view_sur_project_attendance_group g on g.cfgid = u.cfgid and u.companyId=g.companyId
|
||||
where u.cfgid in (select cfg.id from attendance_cfg cfg where cfg.project_id=#{projectId} and cfg.is_del=0)
|
||||
and g.companyTypeId in (0,1,2,3,4,5,6,8)
|
||||
and g.companyTypeId in (1,2,4,5)
|
||||
and u.state=1
|
||||
<if test="name != null and name != ''"> and u.name like concat('%', #{name}, '%')</if>
|
||||
group by g.companyTypeId
|
||||
|
@ -690,7 +690,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from sur_project_attendance_user u
|
||||
left join view_sur_project_attendance_group g on g.cfgid = u.cfgid and u.companyId=g.companyId
|
||||
where u.cfgid in (select cfg.id from attendance_cfg cfg where cfg.project_id=#{projectId} and cfg.is_del=0)
|
||||
and g.companyTypeId in (0,1,2,3,4,5,6,8)
|
||||
and g.companyTypeId in (1,2,4,5)
|
||||
and u.state=0
|
||||
group by g.companyTypeId
|
||||
</select>
|
||||
|
@ -700,7 +700,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
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
|
||||
and p.is_Del=0
|
||||
and g.companyTypeId in (1,6,0,2,3,4,5,8)
|
||||
and g.companyTypeId in (1,2,4,5)
|
||||
<if test="deptId!=null and deptId>0">
|
||||
and p.dis_dept_id=#{deptId}
|
||||
</if>
|
||||
|
@ -726,13 +726,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
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
|
||||
<if test="id==101">
|
||||
and g.companyTypeId in (1,6)
|
||||
and g.companyTypeId in (1)
|
||||
</if>
|
||||
<if test="id==102">
|
||||
and g.companyTypeId =8
|
||||
and g.companyTypeId in (2)
|
||||
</if>
|
||||
<if test="id==103">
|
||||
and g.companyTypeId in (0,2,3,4,5)
|
||||
and g.companyTypeId in (4,5)
|
||||
</if>
|
||||
<if test="projectId!=null and projectId>0">
|
||||
and b.project_id=#{projectId}
|
||||
|
|
|
@ -85,3 +85,11 @@ export function devicePositionUpdateItems(data) {
|
|||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
export function updateBimInfo(data) {
|
||||
return request({
|
||||
url: "/manage/api/bim/plan/updateBimInfo",
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
function selectSingle(that) {
|
||||
let api = bimSelectionDlgApi;
|
||||
api.Public.clearHandler();
|
||||
api.Feature.getByEvent(true, (n) => {
|
||||
if (n && n["id"]) {
|
||||
let featureId = n.id;
|
||||
let modelId = featureId.split("^")[0];
|
||||
if(that.selectItems.includes(featureId)){
|
||||
api.Feature.setColor(featureId, "rgba(255,255,255,1)");
|
||||
let index = that.selectItems.indexOf(featureId);
|
||||
if (index > -1) {
|
||||
that.selectItems.splice(index, 1);
|
||||
}
|
||||
}else{
|
||||
api.Feature.setColor(featureId, "rgba(255,0,255,1)");
|
||||
that.selectItems.push(featureId);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export default {
|
||||
selectSingle,
|
||||
};
|
|
@ -6,10 +6,15 @@
|
|||
<div class="div-left" :class="{ 'is-hide': !leftExpend }">
|
||||
<div class="div-left-title">
|
||||
<el-tabs v-model="activeTab">
|
||||
<el-tab-pane label="结构树" name="a1">
|
||||
|
||||
<el-tab-pane label="结构树" name="a1"> </el-tab-pane>
|
||||
<el-tab-pane label="已关联" name="a2">
|
||||
<div class="sel-list scroll">
|
||||
<div v-for="(it, idx) in selectItems" :key="idx" class="div-sel-item">
|
||||
<div>{{ it.split("^")[1] }}</div>
|
||||
<el-button link>删除</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="已关联" name="a2"></el-tab-pane>
|
||||
<el-tab-pane label="已隐藏" name="a3"></el-tab-pane>
|
||||
</el-tabs>
|
||||
<div class="div-icon">
|
||||
|
@ -44,15 +49,12 @@
|
|||
<svg-icon icon-class="hide" />
|
||||
</div>
|
||||
</el-tooltip>
|
||||
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="show = false">取消</el-button>
|
||||
<el-button type="primary" @click="doSave">
|
||||
保存构件
|
||||
</el-button>
|
||||
<el-button type="primary" @click="doSave"> 保存构件 </el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
@ -60,6 +62,9 @@
|
|||
<script>
|
||||
import useUserStore from "@/store/modules/user";
|
||||
import { listBimModel } from "@/api/bim/bimModel";
|
||||
import bimTools from "./bimSelectTools";
|
||||
import { updateBimInfo } from "@/api/bim/bim";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -75,20 +80,31 @@ export default {
|
|||
leftExpend: true,
|
||||
activeMenu: 0,
|
||||
elId: 0,
|
||||
selectItems: [],
|
||||
};
|
||||
},
|
||||
beforeDestroy() {
|
||||
let api=bimSelectionDlgApi
|
||||
let api = bimSelectionDlgApi;
|
||||
if (api) {
|
||||
api.Public.clearScene();
|
||||
api.Public.destroy();
|
||||
window.bimSelectionDlgApi = null;
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
doSave() {
|
||||
|
||||
updateBimInfo({
|
||||
id: this.plan.id,
|
||||
text: JSON.stringify(this.selectItems),
|
||||
}).then((res) => {
|
||||
console.log(res);
|
||||
if(res.success){
|
||||
ElMessage.success('保存成功')
|
||||
this.show = false;
|
||||
}else{
|
||||
ElMessage.error('保存失败')
|
||||
}
|
||||
});
|
||||
},
|
||||
doMenu(index) {
|
||||
this.activeMenu = index;
|
||||
|
@ -99,6 +115,7 @@ export default {
|
|||
case 1:
|
||||
break;
|
||||
case 2:
|
||||
bimTools.selectSingle(this);
|
||||
break;
|
||||
case 3:
|
||||
break;
|
||||
|
@ -211,9 +228,9 @@ export default {
|
|||
);
|
||||
},
|
||||
resetScene() {
|
||||
let api=bimSelectionDlgApi
|
||||
let api = bimSelectionDlgApi;
|
||||
api.Camera.stopImmersiveRoam();
|
||||
api.Model.location(bimSelectionDlgApi.m_model.keys().toArray()[0]);
|
||||
api.Model.location(api.m_model.keys().toArray()[0]);
|
||||
api.Plugin.deleteMiniMap();
|
||||
if (this.viewPoint) {
|
||||
api.Camera.setViewPort(this.viewPoint);
|
||||
|
@ -224,7 +241,6 @@ export default {
|
|||
</script>
|
||||
<style lang="scss">
|
||||
.bim-selection-dialog {
|
||||
|
||||
.el-dialog {
|
||||
min-width: 960px;
|
||||
width: 80%;
|
||||
|
@ -251,6 +267,17 @@ export default {
|
|||
height: 45px;
|
||||
}
|
||||
.div-left-title {
|
||||
height: 100%;
|
||||
.el-tabs {
|
||||
height: 100%;
|
||||
.el-tabs__content {
|
||||
height: 100%;
|
||||
.el-tab-pane {
|
||||
height: 100%;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.el-tabs__nav-wrap {
|
||||
.el-tabs__nav-prev,
|
||||
.el-tabs__nav-next {
|
||||
|
@ -321,6 +348,25 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
.sel-list {
|
||||
padding: 0px 10px 10px;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
.div-sel-item {
|
||||
background-color: #f7f7f975;
|
||||
position: relative;
|
||||
color: #fff;
|
||||
line-height: 30px;
|
||||
padding: 0px 10px;
|
||||
margin-top: 5px;
|
||||
.el-button {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 4px;
|
||||
color: #f40606;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue