diff --git a/yanzhu-bigscreen/src/pages-old/index.vue b/yanzhu-bigscreen/src/pages-old/index.vue index e5effd9d..b05471b8 100644 --- a/yanzhu-bigscreen/src/pages-old/index.vue +++ b/yanzhu-bigscreen/src/pages-old/index.vue @@ -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 diff --git a/yanzhu-bigscreen/src/pages-old/projectDetail.vue b/yanzhu-bigscreen/src/pages-old/projectDetail.vue index 93044633..01a695ac 100644 --- a/yanzhu-bigscreen/src/pages-old/projectDetail.vue +++ b/yanzhu-bigscreen/src/pages-old/projectDetail.vue @@ -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; diff --git a/yanzhu-bigscreen/src/pages-old/projectSafety.vue b/yanzhu-bigscreen/src/pages-old/projectSafety.vue index 8a98db8c..b3460299 100644 --- a/yanzhu-bigscreen/src/pages-old/projectSafety.vue +++ b/yanzhu-bigscreen/src/pages-old/projectSafety.vue @@ -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; }) diff --git a/yanzhu-bigscreen/src/views/detail/projectInfoDialog.vue b/yanzhu-bigscreen/src/views/detail/projectInfoDialog.vue index 4489e6d6..06c330e3 100644 --- a/yanzhu-bigscreen/src/views/detail/projectInfoDialog.vue +++ b/yanzhu-bigscreen/src/views/detail/projectInfoDialog.vue @@ -48,7 +48,7 @@ - diff --git a/yanzhu-bigscreen/src/views/projectDetail.vue b/yanzhu-bigscreen/src/views/projectDetail.vue index cd9032b5..fcc224b9 100644 --- a/yanzhu-bigscreen/src/views/projectDetail.vue +++ b/yanzhu-bigscreen/src/views/projectDetail.vue @@ -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 diff --git a/yanzhu-bigscreen/src/views/projectLabor.vue b/yanzhu-bigscreen/src/views/projectLabor.vue index 4ff9091b..7d173277 100644 --- a/yanzhu-bigscreen/src/views/projectLabor.vue +++ b/yanzhu-bigscreen/src/views/projectLabor.vue @@ -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; diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/SurProjectAttendanceDataMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/SurProjectAttendanceDataMapper.xml index 945b3370..58eb6a00 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/SurProjectAttendanceDataMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/SurProjectAttendanceDataMapper.xml @@ -118,13 +118,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - and companyTypeId in (1,6) + and companyTypeId in (1) - and companyTypeId =8 + and companyTypeId in (2) - and companyTypeId in (0,2,3,4,5) + and companyTypeId in (4,5) @@ -158,13 +158,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - and companyTypeId in (1,6) + and companyTypeId in (1) - and companyTypeId =8 + and companyTypeId in (2) - and companyTypeId in (0,2,3,4,5) + and companyTypeId in (4,5) @@ -357,7 +357,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and project_id=#{projectId} 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 @@ -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) and p.dis_dept_id=#{deptId} @@ -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 - and g.companyTypeId in (1,6) + and g.companyTypeId in (1) - and g.companyTypeId =8 + and g.companyTypeId in (2) - and g.companyTypeId in (0,2,3,4,5) + and g.companyTypeId in (4,5) and b.project_id=#{projectId} diff --git a/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/domain/SzjEnterpriseInfo.java b/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/domain/SzjEnterpriseInfo.java index a67b560c..673c1acb 100644 --- a/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/domain/SzjEnterpriseInfo.java +++ b/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/domain/SzjEnterpriseInfo.java @@ -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() { diff --git a/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/task/AttendanceSzjTask.java b/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/task/AttendanceSzjTask.java index f0c9cfaf..ce6f90e2 100644 --- a/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/task/AttendanceSzjTask.java +++ b/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/task/AttendanceSzjTask.java @@ -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")); diff --git a/yanzhu-modules/yanzhu-job/src/main/resources/mapper/job/QuartzProjectAttendanceDataMapper.xml b/yanzhu-modules/yanzhu-job/src/main/resources/mapper/job/QuartzProjectAttendanceDataMapper.xml index ab7337fb..4b852704 100644 --- a/yanzhu-modules/yanzhu-job/src/main/resources/mapper/job/QuartzProjectAttendanceDataMapper.xml +++ b/yanzhu-modules/yanzhu-job/src/main/resources/mapper/job/QuartzProjectAttendanceDataMapper.xml @@ -117,13 +117,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - and companyTypeId in (1,6) + and companyTypeId in (1) - and companyTypeId =8 + and companyTypeId in (2) - and companyTypeId in (0,2,3,4,5) + and companyTypeId in (4,5) @@ -157,13 +157,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - and companyTypeId in (1,6) + and companyTypeId in (1) - and companyTypeId =8 + and companyTypeId in (2) - and companyTypeId in (0,2,3,4,5) + and companyTypeId in (4,5) @@ -355,7 +355,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and projectId=#{projectId} 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 @@ -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) and p.dis_dept_id=#{deptId} @@ -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 - and g.companyTypeId in (1,6) + and g.companyTypeId in (1) - and g.companyTypeId =8 + and g.companyTypeId in (2) - and g.companyTypeId in (0,2,3,4,5) + and g.companyTypeId in (4,5) and b.project_id=#{projectId} diff --git a/yanzhu-ui-vue3/src/api/bim/bim.js b/yanzhu-ui-vue3/src/api/bim/bim.js index 41899dd4..06e212a5 100644 --- a/yanzhu-ui-vue3/src/api/bim/bim.js +++ b/yanzhu-ui-vue3/src/api/bim/bim.js @@ -84,4 +84,33 @@ export function devicePositionUpdateItems(data) { method: "post", data: data, }); -} \ No newline at end of file +} + +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", + }); +}; \ No newline at end of file diff --git a/yanzhu-ui-vue3/src/views/manage/plan/bimSelectTools.js b/yanzhu-ui-vue3/src/views/manage/plan/bimSelectTools.js new file mode 100644 index 00000000..f771a550 --- /dev/null +++ b/yanzhu-ui-vue3/src/views/manage/plan/bimSelectTools.js @@ -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, +}; diff --git a/yanzhu-ui-vue3/src/views/manage/plan/bimSelectionDialog.vue b/yanzhu-ui-vue3/src/views/manage/plan/bimSelectionDialog.vue index a3be9dd6..2ca3b001 100644 --- a/yanzhu-ui-vue3/src/views/manage/plan/bimSelectionDialog.vue +++ b/yanzhu-ui-vue3/src/views/manage/plan/bimSelectionDialog.vue @@ -3,13 +3,35 @@
-
+
- +
+ +
+
+ +
+
+ +
{{ it.info }}
+
+ 删除 +
+
-
@@ -18,8 +40,8 @@
- - @@ -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) {