dev_xd
姜玉琦 2025-06-28 10:35:58 +08:00
commit 556c4ce1b3
16 changed files with 538 additions and 181 deletions

View File

@ -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

View File

@ -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;

View File

@ -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;
})

View File

@ -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" />

View File

@ -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

View File

@ -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;

View File

@ -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 &lt;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 &lt;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 &lt;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

View File

@ -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 &lt;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 &lt;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 &lt;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}

View File

@ -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() {

View File

@ -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"));

View File

@ -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 &lt;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 &lt;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

View File

@ -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 &lt;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 &lt;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 &lt;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}

View File

@ -84,4 +84,33 @@ export function devicePositionUpdateItems(data) {
method: "post",
data: data,
});
}
}
export function updateBimInfo(data) {
return request({
url: "/manage/api/bim/plan/updateBimInfo",
method: "post",
data: data,
});
}
export function getPlanBimInfo(id){
return request({
url: `/manage/api/bim/plan/getBimInfo?id=${id}`,
method: "get"
});
}
export function getPlanAllBimInfo(prjId){
return request({
url: `/manage/api/bim/plan/getAllBimInfo?projectId=${prjId}`,
method: "get"
});
}
export function modelTreeAllChild (name, pid) {
return request({
url: "/manage/bim/modelInfo/modelTreeAllChild/" + name + "?pid=" + pid,
method: "get",
});
};

View File

@ -0,0 +1,197 @@
import { modelTreeAllChild } from "@/api/bim/bim";
function selectFeature(that, featureId) {
let api = bimSelectionDlgApi;
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);
}
}
function hideFeatures(that) {
let tmps = that.allBimData.filter((it) => it.id != that.plan.id);
tmps.forEach((it) => {
console.log("hide-->", it.bim);
it.bim.forEach((it) => {
hideFeature(that, it);
});
});
}
function hideFeature(that, featureId) {
let api = bimSelectionDlgApi;
api.Feature.setVisible(featureId, false);
}
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];
selectFeature(that, featureId);
}
});
}
function clearAllSelection(that) {
let api = bimSelectionDlgApi;
api.Public.clearHandler();
that.selectItems.forEach((it) => {
selectFeature(that, it);
});
}
function initBim(that) {
console.log("initBim");
let tmps = that.allBimData.filter((it) => it.id == that.plan.id);
if (tmps.length > 0) {
console.log("selected-->", tmps[0].bim);
tmps[0].bim.forEach((it) => {
selectFeature(that, it);
});
}
}
function getSelectFeatureIds(that) {
let tmps = that.allBimData.filter((it) => it.id == that.plan.id);
if (tmps.length > 0) {
return tmps[0].bim || [];
}
return [];
}
// 加载部分模型(计划中绑定的模型)
function partLoadModel(that) {
let featureIds = getSelectFeatureIds(that);
let api = bimSelectionDlgApi;
let obj = {};
for (let i = 0; i < featureIds.length; i++) {
let it = featureIds[i];
let tmps = it.split("^");
let modelId = tmps[0];
if (!obj[modelId]) {
obj[modelId] = [];
}
obj[modelId].push(it);
}
for (let modelId in obj) {
let tmps = that.models.filter((it) => it.modelId == modelId);
setTimeout(() => {
that.$refs.tree.setChecked(modelId, true, true);
}, 1000);
if (tmps.length > 0) {
let url = `${window.config.modelUrl}/Tools/output/model/${modelId}/root.glt`;
that.partLoad = true;
api.Model.addPart(
url,
modelId,
obj[modelId].join("#"),
(res) => {},
(res) => {
console.log("load part success", res);
that.viewPoint = p;
that.$message.info("模型加载完成");
that.doMenu(2);
initBim(that);
},
{
FlyTo: true,
}
);
}
}
}
//构建树形数据
function buildTreeData(that) {
that.modelTrees = [
{
title: "项目模型",
level: 0,
type: "root",
key: "root",
children: [],
hadLoad: true,
},
];
that.models.forEach((d) => {
let node = {
title: d.modelName,
level: 1,
type: "model",
hasLoad: false,
modelId: d.lightweightName,
key: d.lightweightName,
externalId: "0",
glid: "",
children: [],
data: d,
};
that.modelTrees[0].children.push(node);
getModelFeatures(that, d.lightweightName, node);
});
that.treeExpendedKeys.push("root");
}
//获取模型所有构件
function getModelFeatures(that, modelId, node) {
let tmps = that.allBimData.filter((it) => it.id != that.plan.id);
tmps.forEach((it) => {
console.log("hide-->", it.bim);
it.bim.forEach((it) => {
if (!that.readlyParts.includes(it)) {
that.readlyParts.push(it);
}
});
});
//获取模型构件
modelTreeAllChild(modelId, "").then((res) => {
let objs = res.data || []
objs.forEach((o) => {
o.modelId=modelId
o.featureId=o.modelId+"^"+o.externalId
o.name=o.name||'';
o.name=o.name.replaceAll('"',"").replaceAll("'","").replaceAll('\\','');
o.info=`[${o.externalId}]${o.groupname}-${o.name}`
if(o.externalId == "0"){
return;
}
let featureId=o.modelId+"^"+o.externalId;
if (!that.allParts.includes(featureId)) {
that.allParts.push(featureId);
}
});
that.allFeatures = objs;
let makeTree = (tmps) => {
tmps.forEach((item) => {
item.children = objs.filter((it) => it.pglid == item.glid);
if (item.children.length > 0) {
makeTree(item.children);
}
item.hasLoad = true;
item.title = item.name;
item.key = item.glid;
item.modelId = node.modelId;
});
return tmps;
};
node.children = makeTree(objs.filter((item) => item.level == 0));
that.treeKey++;
});
that.showParts = that.allParts.filter((it) => !that.hideParts.includes(it));
}
export default {
selectSingle,
initBim,
clearAllSelection,
partLoadModel,
buildTreeData,
};

View File

@ -3,13 +3,35 @@
<div id="bimSelectionDlg">
<div id="bimSelectionDlgContainer" class="bimSelectionDlgContainer"></div>
</div>
<div class="div-left" :class="{'is-hide':!leftExpend}">
<div class="div-left" :class="{ 'is-hide': !leftExpend }">
<div class="div-left-title">
<el-tabs v-model="activeTab">
<el-tab-pane label="结构树" name="a1">
<div class="model-tree scroll">
<el-tree
:key="treeKey"
ref="tree"
:default-expanded-keys="treeExpendedKeys"
:props="{
children: 'children',
label: 'title',
}"
node-key="key"
@check="onCheckTree"
:data="modelTrees"
show-checkbox></el-tree>
</div>
</el-tab-pane>
<el-tab-pane label="已关联" name="a2">
<div class="sel-list scroll">
<div v-for="(it, idx) in getSelectItems(selectItems)" :key="idx" class="div-sel-item">
<el-tooltip placement="bottom" :content="it.info">
<div class="sel-item-info">{{ it.info }}</div>
</el-tooltip>
<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">
@ -18,8 +40,8 @@
</div>
</div>
</div>
<div class="footer-box" v-if="models.length > 0" >
<el-tooltip placement="top" content="主视图">
<div class="footer-box" v-if="models.length > 0">
<el-tooltip placement="top" content="主视图">
<div class="footer-btn" @click="doMenu(0)" :class="activeMenu == 0 ? 'is-active' : ''">
<svg-icon icon-class="home" />
</div>
@ -44,15 +66,12 @@
<svg-icon icon-class="hide" />
</div>
</el-tooltip>
</div>
<template #footer>
<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,11 +79,15 @@
<script>
import useUserStore from "@/store/modules/user";
import { listBimModel } from "@/api/bim/bimModel";
import bimTools from "./bimSelectTools";
import { updateBimInfo, getPlanAllBimInfo } from "@/api/bim/bim";
import { ElMessage, ElMessageBox } from "element-plus";
export default {
data() {
return {
title: "任务计划绑定BIM",
show: false,
partLoad: false, //
plan: null,
currentPrjId: null,
currentComId: null,
@ -75,30 +98,58 @@ export default {
leftExpend: true,
activeMenu: 0,
elId: 0,
selectItems: [],
allBimData: [],
treeKey: 0,
modelTrees: [],
treeExpendedKeys: [],
allFeatures: [], //
allParts: [], //ID
showParts: [], //ID
readlyParts: [], //ID
};
},
beforeDestroy() {
let api=bimSelectionDlgApi
if(api){
let api = bimSelectionDlgApi;
if (api) {
api.Public.clearScene();
api.Public.destroy();
window.bimSelectionDlgApi = null;
}
},
methods: {
doSave(){
onCheckTree(node, event) {},
getSelectItems() {
return this.selectItems.map((it) => {
return this.allFeatures.find((item) => item.featureId == it);
});
},
doSave() {
updateBimInfo({
id: this.plan.id,
text: JSON.stringify(this.selectItems),
}).then((res) => {
console.log(res);
if (res.success) {
ElMessage.success("保存成功");
this.show = false;
this.$emit("success");
} else {
ElMessage.error("保存失败");
}
});
},
doMenu(index) {
this.activeMenu = index;
switch(index){
switch (index) {
case 0:
this.resetScene();
break;
case 1:
bimTools.clearAllSelection(this);
break;
case 2:
bimTools.selectSingle(this);
break;
case 3:
break;
@ -107,12 +158,30 @@ export default {
}
},
showDialog(plan) {
window.bimDlg = this;
this.plan = plan;
this.show = true;
this.activeTab = "a1";
this.userStore = useUserStore();
this.currentPrjId = this.userStore.currentPrjId;
this.currentComId = this.userStore.currentComId;
this.selectItems = [];
this.allBimData = [];
this.treeKey = 0;
this.partLoad = false;
this.modelTrees = [];
this.treeExpendedKeys = [];
this.allParts = [];
this.hideParts = [];
this.readlyParts = [];
this.allFeatures = [];
getPlanAllBimInfo(this.plan.projectId).then((res) => {
this.allBimData = (res.data || []).map((it) => {
it.bim = this.$tryToJson(it.bimId || "[]", []);
return it;
});
});
this.initEngine();
},
initEngine() {
@ -181,13 +250,19 @@ export default {
comId: this.currentComId,
projectId: this.currentPrjId,
}).then((d) => {
this.models = d.rows || [];
this.models = (d.rows || []).map((it) => {
it.modelId = it.lightweightName;
it.gis = this.$tryToJson(it.gisJson || "{}", {});
return it;
});
if (this.models.length == 0) {
this.$modal.msgError("暂无模型,请先关联模型");
} else {
this.models.forEach((item) => {
this.addModel(item.lightweightName);
});
bimTools.buildTreeData(this);
bimTools.partLoadModel(this);
// this.models.forEach((item) => {
// this.addModel(item.lightweightName);
// });
}
});
},
@ -205,17 +280,19 @@ export default {
bimSelectionDlgApi.Camera.getViewPort((p) => {
this.viewPoint = p;
this.$message.info("模型加载完成");
bimTools.initBim(this);
this.doMenu(2);
});
}, 1000);
}
);
},
resetScene() {
let api=bimSelectionDlgApi
resetScene() {
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){
if (this.viewPoint) {
api.Camera.setViewPort(this.viewPoint);
}
},
@ -224,10 +301,9 @@ export default {
</script>
<style lang="scss">
.bim-selection-dialog {
.el-dialog {
min-width: 960px;
width: 80%;
width: 80%;
height: 80vh;
.el-dialog__body {
max-height: calc(100% - 80px) !important;
@ -251,6 +327,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 {
@ -288,39 +375,90 @@ export default {
}
}
.footer-box {
position: absolute;
bottom: 6vh;
left: 50%;
margin-left: -75px;
background: #274754;
border-radius: 4px;
.footer-box {
position: absolute;
bottom: 6vh;
left: 50%;
margin-left: -75px;
background: #274754;
border-radius: 4px;
.footer-btn {
display: inline-flex;
width: 40px;
height: 40px;
justify-content: center;
align-items: center;
cursor: pointer;
.footer-btn {
display: inline-flex;
width: 40px;
height: 40px;
justify-content: center;
align-items: center;
cursor: pointer;
svg {
width: 20px;
height: 20px;
fill: #fff;
}
&:hover {
background: #408edb97;
}
&.is-active {
svg {
fill: rgb(0, 255, 174);
width: 20px;
height: 20px;
fill: #fff;
}
&:hover {
background: #408edb97;
}
&.is-active {
svg {
fill: rgb(0, 255, 174);
}
}
}
}
.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;
.sel-item-info {
width: calc(100% - 40px);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer;
}
.el-button {
position: absolute;
right: 10px;
top: 4px;
color: #f40606;
}
}
}
.model-tree {
height: calc(100% - 36px);
overflow-y: auto;
.el-tree {
background: transparent;
color: #eee;
.el-checkbox {
color: #45fdfe;
}
.el-tree-node {
&:focus {
& > .el-tree-node__content {
background: #3489d966;
&:hover {
background: #3489d966;
}
}
}
.el-tree-node__content:hover {
background: #3489d966;
}
}
}
}
}
}
}
</style>

View File

@ -69,7 +69,7 @@
<el-table-column label="负责人" align="center" prop="operator" width="120" />
<el-table-column label="班组名称" align="center" prop="groupName" width="120" />
</el-table>
<bim-selection-dialog ref="bimDlg"></bim-selection-dialog>"
<bim-selection-dialog ref="bimDlg" @success="doSelectSuccess"></bim-selection-dialog>"
</div>
</template>
@ -141,6 +141,9 @@ const data = reactive({
const { queryParams, form, rules } = toRefs(data);
function doSelectSuccess(){
handleQuery();
}
function buildTree(all, id) {
let tmps = all.filter((d) => d.parentId == id);
if (tmps.length > 0) {