diff --git a/src/main/java/com/zhgd/xmgl/constant/Cts.java b/src/main/java/com/zhgd/xmgl/constant/Cts.java index 92607b792..ddab29077 100644 --- a/src/main/java/com/zhgd/xmgl/constant/Cts.java +++ b/src/main/java/com/zhgd/xmgl/constant/Cts.java @@ -84,6 +84,7 @@ public interface Cts { * 忽略数据权限查询条件 */ String IGNORE_DATA_SCOPE_CONDITION = " and 'ignoreDataScope' = 'ignoreDataScope' "; + String IGNORE_DATA_SCOPE_CONDITION_WHERE = "where 'ignoreDataScope' = 'ignoreDataScope' "; String DOT = "."; /** diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/controller/ConstructionEquipmentToolController.java b/src/main/java/com/zhgd/xmgl/modules/baotou/controller/ConstructionEquipmentToolController.java index 333141526..0139b5c32 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/controller/ConstructionEquipmentToolController.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/controller/ConstructionEquipmentToolController.java @@ -12,9 +12,12 @@ import com.gexin.fastjson.JSON; import com.zhgd.annotation.OperLog; import com.zhgd.jeecg.common.api.vo.Result; import com.zhgd.jeecg.common.execption.OpenAlertException; +import com.zhgd.xmgl.constant.Cts; import com.zhgd.xmgl.modules.baotou.entity.ConstructionEquipmentTool; import com.zhgd.xmgl.modules.baotou.service.IConstructionEquipmentToolFileService; import com.zhgd.xmgl.modules.baotou.service.IConstructionEquipmentToolService; +import com.zhgd.xmgl.modules.worker.entity.EnterpriseInfo; +import com.zhgd.xmgl.modules.worker.service.impl.EnterpriseInfoServiceImpl; import com.zhgd.xmgl.util.JoBuilder; import com.zhgd.xmgl.util.MinioUtils; import com.zhgd.xmgl.util.PathUtil; @@ -40,6 +43,9 @@ import java.io.IOException; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Optional; +import java.util.function.Function; +import java.util.stream.Collectors; /** @@ -60,6 +66,9 @@ public class ConstructionEquipmentToolController { @Lazy @Autowired MinioUtils minioUtils; + @Autowired + @Lazy + EnterpriseInfoServiceImpl enterpriseInfoService; @Lazy @Autowired private IConstructionEquipmentToolService constructionEquipmentToolService; @@ -183,6 +192,8 @@ public class ConstructionEquipmentToolController { if (!foldFile.exists()) { foldFile.mkdirs(); } + Map enterpriseIdMap = enterpriseInfoService.list(new LambdaQueryWrapper() + .last(Cts.IGNORE_DATA_SCOPE_CONDITION_WHERE)).stream().collect(Collectors.toMap(EnterpriseInfo::getId, Function.identity(), (o1, o2) -> o1)); for (ConstructionEquipmentTool tool : list) { minioUtils.downloadFile(tool.getQrCode()); Image qrCodeImg = ImgUtil.read(PathUtil.getBasePath() + "/" + tool.getQrCode()); @@ -206,7 +217,7 @@ public class ConstructionEquipmentToolController { } else if (i == 4 || i == 5) { text = tool.getSpecificationModel(); } else if (i == 6 || i == 7) { - text = tool.getEquipmentSourceUnit(); + text = Optional.ofNullable(enterpriseIdMap.get(tool.getEquipmentSourceUnit())).map(m -> m.getEnterpriseName()).orElse(""); } else { text = tool.getEquipmentLocation(); } diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/entity/ConstructionEquipmentTool.java b/src/main/java/com/zhgd/xmgl/modules/baotou/entity/ConstructionEquipmentTool.java index c1d2567d9..afa1c6cdb 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/entity/ConstructionEquipmentTool.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/entity/ConstructionEquipmentTool.java @@ -69,18 +69,24 @@ public class ConstructionEquipmentTool implements Serializable { @Excel(name = "状态", width = 15) @ApiModelProperty(value="状态") private java.lang.String status ; - /**生产厂商*/ + /** + * 生产厂商 + */ @Excel(name = "生产厂商", width = 15) - @ApiModelProperty(value="生产厂商") - private java.lang.String manufacturer ; - /**所属单位*/ + @ApiModelProperty(value = "生产厂商") + private java.lang.String manufacturer; + /** + * 所属单位 + */ @Excel(name = "所属单位", width = 15) - @ApiModelProperty(value="所属单位") - private java.lang.String equipmentSourceUnit ; - /**安装拆除单位*/ + @ApiModelProperty(value = "所属单位") + private java.lang.Long equipmentSourceUnit; + /** + * 安装拆除单位 + */ @Excel(name = "安装拆除单位", width = 15) - @ApiModelProperty(value="安装拆除单位") - private java.lang.String installationRemovalUnit ; + @ApiModelProperty(value = "安装拆除单位") + private java.lang.String installationRemovalUnit; /**使用装置*/ @Excel(name = "使用装置", width = 15) @ApiModelProperty(value="使用装置") @@ -140,15 +146,18 @@ public class ConstructionEquipmentTool implements Serializable { @ApiModelProperty(value="施工单位人员名称") private java.lang.String constructionUnitPersonnelName ; @TableField(exist = false) - @ApiModelProperty(value="EPC安全人员名称") - private java.lang.String epcSafetyPersonnelName ; - @TableField(exist = false) - @ApiModelProperty(value="监理安全人员名称") - private java.lang.String supervisionSafetyPersonnelName ; - @TableField(exist = false) - @ApiModelProperty(value="项目安全经理名称") - private java.lang.String projectSafetySupervisionName ; - @TableField(exist = false) - @ApiModelProperty(value="安质环部设备工程师名称") - private java.lang.String safetyQualityDepartmentName ; + @ApiModelProperty(value = "EPC安全人员名称") + private java.lang.String epcSafetyPersonnelName; + @TableField(exist = false) + @ApiModelProperty(value = "监理安全人员名称") + private java.lang.String supervisionSafetyPersonnelName; + @TableField(exist = false) + @ApiModelProperty(value = "项目安全经理名称") + private java.lang.String projectSafetySupervisionName; + @TableField(exist = false) + @ApiModelProperty(value = "安质环部设备工程师名称") + private java.lang.String safetyQualityDepartmentName; + @TableField(exist = false) + @ApiModelProperty(value = "所属单位") + private java.lang.String equipmentSourceUnitName ; } diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/entity/EngineerControllerLevel.java b/src/main/java/com/zhgd/xmgl/modules/baotou/entity/EngineerControllerLevel.java index 3400c3fc7..09b12c0a8 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/entity/EngineerControllerLevel.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/entity/EngineerControllerLevel.java @@ -128,7 +128,7 @@ public class EngineerControllerLevel implements Serializable { @ApiModelProperty(value = "施工部专业负责人") private java.lang.Long constructionDepartmentProfessionalDirector; @ApiModelProperty(value = "专业:1:土建工程;2:土建特种;3:静设备工程;4:动设备工程;5:管道工程;6:电气工程;7:仪表工程;8:其他;") - private java.lang.Integer major; + private java.lang.String major; @TableField(exist = false) @ApiModelProperty(value = "编制名称") private java.lang.String preparedName; diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/entity/EngineeringSurveyRetest.java b/src/main/java/com/zhgd/xmgl/modules/baotou/entity/EngineeringSurveyRetest.java index 927765352..2d748107d 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/entity/EngineeringSurveyRetest.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/entity/EngineeringSurveyRetest.java @@ -98,26 +98,32 @@ public class EngineeringSurveyRetest implements Serializable { @DateTimeFormat(pattern="yyyy-MM-dd") @ApiModelProperty(value="项目组专业工程师日期") private java.util.Date projectTeamProfessionalEngineerDate ; - /**创建时间 yyyy-MM-dd HH:mm:ss*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value="创建时间 yyyy-MM-dd HH:mm:ss") - private java.util.Date createTime ; - /**更新时间 yyyy-MM-dd HH:mm:ss*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value="更新时间 yyyy-MM-dd HH:mm:ss") - private java.util.Date updateTime ; + /** + * 创建时间 yyyy-MM-dd HH:mm:ss + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建时间 yyyy-MM-dd HH:mm:ss") + private java.util.Date createTime; + /** + * 更新时间 yyyy-MM-dd HH:mm:ss + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新时间 yyyy-MM-dd HH:mm:ss") + private java.util.Date updateTime; + @ApiModelProperty(value = "施工承包商") + private java.lang.Long constructionContractor; - @TableField(exist = false) - @ApiModelProperty(value="装置/单元工程名称") - private java.lang.String deviceUnitEngineeringName ; - @TableField(exist = false) - @ApiModelProperty(value="区域项目组名称") - private java.lang.String regionalProjectTeamName ; - @TableField(exist = false) - @ApiModelProperty(value="工程承包商名称") - private java.lang.String engineerContractorName ; + @TableField(exist = false) + @ApiModelProperty(value = "装置/单元工程名称") + private java.lang.String deviceUnitEngineeringName; + @TableField(exist = false) + @ApiModelProperty(value = "区域项目组名称") + private java.lang.String regionalProjectTeamName; + @TableField(exist = false) + @ApiModelProperty(value = "工程承包商名称") + private java.lang.String engineerContractorName; @TableField(exist = false) @ApiModelProperty(value="建设/监理单位名称") private java.lang.String constructionSupervisionUnitName ; @@ -128,15 +134,19 @@ public class EngineeringSurveyRetest implements Serializable { @ApiModelProperty(value="技术负责人名称") private java.lang.String technicalChargePersonName ; @TableField(exist = false) - @ApiModelProperty(value="监理单位名称") - private java.lang.String supervisionUnitName ; - @TableField(exist = false) - @ApiModelProperty(value="专业工程师名称") - private java.lang.String professionalEngineerName ; - @TableField(exist = false) - @ApiModelProperty(value="项目组名称") - private java.lang.String projectTeamName ; - @TableField(exist = false) - @ApiModelProperty(value="项目组专业工程师名称") - private java.lang.String projectTeamProfessionalEngineerName ; + @ApiModelProperty(value = "监理单位名称") + private java.lang.String supervisionUnitName; + @TableField(exist = false) + @ApiModelProperty(value = "专业工程师名称") + private java.lang.String professionalEngineerName; + @TableField(exist = false) + @ApiModelProperty(value = "项目组名称") + private java.lang.String projectTeamName; + @TableField(exist = false) + @ApiModelProperty(value = "项目组专业工程师名称") + private java.lang.String projectTeamProfessionalEngineerName; + @TableField(exist = false) + @ApiModelProperty(value = "施工承包商名称") + private java.lang.String constructionContractorName ; + } diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/entity/QualityProblem.java b/src/main/java/com/zhgd/xmgl/modules/baotou/entity/QualityProblem.java index 48aef7cb6..bd9be70f8 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/entity/QualityProblem.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/entity/QualityProblem.java @@ -80,10 +80,10 @@ public class QualityProblem implements Serializable { @ApiModelProperty(value = "涉及部门") private java.lang.Long department; /** - * 涉及技术专业:1:土建;2:管道;3:设备;4:电气;5:仪表;6:其他; + * 涉及技术专业:1:土建;2:管道;3:动设备;4:静设备;5:电气;6:仪表; */ - @Excel(name = "涉及技术专业", width = 15,replace={"土建_1","管道_2","设备_3","电气_4","仪表_5","其他_6"}) - @ApiModelProperty(value = "涉及技术专业:1:土建;2:管道;3:设备;4:电气;5:仪表;6:其他;") + @Excel(name = "涉及技术专业", width = 15, replace = {"土建_1", "管道_2", "动设备_3", "静设备_4", "电气_5", "仪表_6"}) + @ApiModelProperty(value = "涉及技术专业:1:土建;2:管道;3:动设备;4:静设备;5:电气;6:仪表;") private java.lang.Integer technology; /** * 制造/供货商id diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/xml/ConstructionEquipmentToolMapper.xml b/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/xml/ConstructionEquipmentToolMapper.xml index 238a1dae3..8835b7445 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/xml/ConstructionEquipmentToolMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/xml/ConstructionEquipmentToolMapper.xml @@ -13,9 +13,11 @@ ,su2.real_name as supervision_safety_personnel_name ,su3.real_name as project_safety_supervision_name ,su4.real_name as safety_quality_department_name + ,ei.enterprise_name as equipment_source_unit_name from construction_equipment_tool t - left join construction_equipment_tool_classification cetc on t.construction_equipment_tool_classification_id = cetc.id + left join construction_equipment_tool_classification cetc on t.construction_equipment_tool_classification_id = + cetc.id left join worker_info wi1 on t.equipment_manager=wi1.id left join worker_info wi2 on t.on_site_handler=wi2.id left join system_user su0 on su0.user_id=t.construction_unit_personnel @@ -23,7 +25,8 @@ left join system_user su2 on su2.user_id=t.supervision_safety_personnel left join system_user su3 on su3.user_id=t.project_safety_supervision left join system_user su4 on su4.user_id=t.safety_quality_department - )t + left join enterprise_info ei on ei.id=t.equipment_source_unit + )t ${ew.customSqlSegment} @@ -39,9 +42,11 @@ ,su2.real_name as supervision_safety_personnel_name ,su3.real_name as project_safety_supervision_name ,su4.real_name as safety_quality_department_name + ,ei.enterprise_name as equipment_source_unit_name from construction_equipment_tool t - left join construction_equipment_tool_classification cetc on t.construction_equipment_tool_classification_id = cetc.id + left join construction_equipment_tool_classification cetc on t.construction_equipment_tool_classification_id = + cetc.id left join worker_info wi1 on t.equipment_manager=wi1.id left join worker_info wi2 on t.on_site_handler=wi2.id left join system_user su0 on su0.user_id=t.construction_unit_personnel @@ -49,7 +54,8 @@ left join system_user su2 on su2.user_id=t.supervision_safety_personnel left join system_user su3 on su3.user_id=t.project_safety_supervision left join system_user su4 on su4.user_id=t.safety_quality_department + left join enterprise_info ei on ei.id=t.equipment_source_unit )t where id = #{id} - + diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/xml/EngineeringSurveyRetestMapper.xml b/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/xml/EngineeringSurveyRetestMapper.xml index fa3cc901a..cc783913f 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/xml/EngineeringSurveyRetestMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/xml/EngineeringSurveyRetestMapper.xml @@ -14,11 +14,13 @@ ,po1.dept_name as contractor_name ,po2.dept_name as supervision_unit_name ,po3.dept_name as project_team_name + ,ei3.enterprise_name as construction_contractor_name from engineering_survey_retest t left join device_unit du on du.id=t.device_unit_engineering left join project_group pg on pg.id=t.regional_project_team left join enterprise_info ei1 on ei1.id=t.engineer_contractor left join enterprise_info ei2 on ei2.id=t.construction_supervision_unit + left join enterprise_info ei3 on ei3.id=t.construction_contractor left join system_user su1 on su1.user_id=t.technical_charge_person left join system_user su2 on su2.user_id=t.professional_engineer left join system_user su3 on su3.user_id=t.project_team_professional_engineer @@ -41,11 +43,13 @@ ,po1.dept_name as contractor_name ,po2.dept_name as supervision_unit_name ,po3.dept_name as project_team_name + ,ei3.enterprise_name as construction_contractor_name from engineering_survey_retest t left join device_unit du on du.id=t.device_unit_engineering left join project_group pg on pg.id=t.regional_project_team left join enterprise_info ei1 on ei1.id=t.engineer_contractor left join enterprise_info ei2 on ei2.id=t.construction_supervision_unit + left join enterprise_info ei3 on ei3.id=t.construction_contractor left join system_user su1 on su1.user_id=t.technical_charge_person left join system_user su2 on su2.user_id=t.professional_engineer left join system_user su3 on su3.user_id=t.project_team_professional_engineer diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/ConstructionEquipmentToolServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/ConstructionEquipmentToolServiceImpl.java index 21277cc95..52b4a4fd8 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/ConstructionEquipmentToolServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/ConstructionEquipmentToolServiceImpl.java @@ -147,7 +147,6 @@ public class ConstructionEquipmentToolServiceImpl extends ServiceImpl 0) { for (ConcreteMonitorCurrentData currentData : concreteMonitorCurrentDataVo.getList()) { + if (NumberUtil.equals(currentData.getTemperature(), -100D)) { + //忽略数据,-100这个是特殊数据,有两种情况,第一种就是没有插传感器,第二种就是传感器损坏。如果接收到-100这种数据,就判定为空数据。 + continue; + } currentData.setProjectSn(projectSn); currentData.setDevSn(devSn); currentData.setReceiveTime(concreteMonitorCurrentDataVo.getReceiveTime()); @@ -194,12 +200,13 @@ public class ConcreteMonitorCurrentDataServiceImpl extends ServiceImpl data.getDevSn() + ":" + data.getReceiveTime())); for (BaotouConcreteMonitorCurrentDataVo record : records) { - List concreteMonitorCurrentDatas = timeMap.get(record.getReceiveTime()); - if (concreteMonitorCurrentDatas != null) { - concreteMonitorCurrentDatas.sort((o1, o2) -> o1.getPointNo().compareTo(o2.getPointNo())); - record.setDataList(concreteMonitorCurrentDatas); + List datas = timeMap.get(record.getDevSn() + ":" + record.getReceiveTime()); + if (datas != null) { + datas = new ArrayList<>(datas.stream().collect(Collectors.toMap(ConcreteMonitorCurrentData::getPointNo, Function.identity(), (o1, o2) -> o1)).values()); + datas.sort((o1, o2) -> o1.getPointNo().compareTo(o2.getPointNo())); + record.setDataList(datas); } } } diff --git a/src/main/java/com/zhgd/xmgl/modules/worker/controller/WorkerInfoController.java b/src/main/java/com/zhgd/xmgl/modules/worker/controller/WorkerInfoController.java index 28077ea8d..7d0795b95 100644 --- a/src/main/java/com/zhgd/xmgl/modules/worker/controller/WorkerInfoController.java +++ b/src/main/java/com/zhgd/xmgl/modules/worker/controller/WorkerInfoController.java @@ -572,7 +572,7 @@ public class WorkerInfoController { @ApiOperation(value = "查询项目下按照班组统计", notes = "查询项目下按照班组统计") @ApiImplicitParams({ @ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"), - @ApiImplicitParam(name = "userEnterpriseId", value = "用户能查看的企业", paramType = "body", required = false, dataType = "String"), + @ApiImplicitParam(name = "userEnterpriseId", value = "用户能查看的企业(多个,分隔)", paramType = "body", required = false, dataType = "String"), @ApiImplicitParam(name = "queryStartTime", value = "查询人员开始时间2022-03-01", paramType = "body", required = false, dataType = "String"), @ApiImplicitParam(name = "queryEndTime", value = "查询人员结束时间2022-03-01", paramType = "body", required = false, dataType = "String"), }) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index d09c7f092..c6904c725 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -168,9 +168,9 @@ is-license=false #天气url tianqiUrl=http://v1.yiketianqi.com #天气appid -tianqiAppid=98454448 +tianqiAppid=84669148 #天气appsecret -tianqiAppsecret=ZIycjw4u +tianqiAppsecret=Kdkm8isv spring.jackson.date-format=yyyy-MM-dd HH:mm:ss spring.jackson.time-zone=GMT+8 #邮箱配置