包头bug修改

This commit is contained in:
guoshengxiong 2025-04-07 19:35:24 +08:00
parent 1f418616db
commit 62bc4fd109
14 changed files with 119 additions and 71 deletions

View File

@ -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 = ".";
/**

View File

@ -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<Long, EnterpriseInfo> enterpriseIdMap = enterpriseInfoService.list(new LambdaQueryWrapper<EnterpriseInfo>()
.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();
}

View File

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

View File

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

View File

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

View File

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

View File

@ -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}
</select>
@ -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}
</select>
</select>
</mapper>

View File

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

View File

@ -147,7 +147,6 @@ public class ConstructionEquipmentToolServiceImpl extends ServiceImpl<Constructi
String projectEquipmentNumber = MapUtils.getString(map, "projectEquipmentNumber");
String status = MapUtils.getString(map, "status");
String manufacturer = MapUtils.getString(map, "manufacturer");
String equipmentSourceUnit = MapUtils.getString(map, "equipmentSourceUnit");
String installationRemovalUnit = MapUtils.getString(map, "installationRemovalUnit");
String deviceUsed = MapUtils.getString(map, "deviceUsed");
String equipmentLocation = MapUtils.getString(map, "equipmentLocation");
@ -169,7 +168,7 @@ public class ConstructionEquipmentToolServiceImpl extends ServiceImpl<Constructi
tool.setShipmentDate(shipmentDate);
tool.setStatus(status);
tool.setManufacturer(manufacturer);
tool.setEquipmentSourceUnit(equipmentSourceUnit);
tool.setEquipmentSourceUnit(FlowUtil.getPullDownLong(map, "equipmentSourceUnit"));
tool.setInstallationRemovalUnit(installationRemovalUnit);
tool.setDeviceUsed(deviceUsed);
tool.setEquipmentLocation(equipmentLocation);

View File

@ -112,7 +112,7 @@ public class EngineerControllerLevelServiceImpl extends ServiceImpl<EngineerCont
e.setProjectTeamProfessionalEngineer(FlowUtil.getPullDownLong(map, "projectTeamProfessionalEngineer"));
e.setProjectManager(FlowUtil.getPullDownLong(map, "projectManager"));
e.setConstructionDepartmentProfessionalDirector(FlowUtil.getPullDownLong(map, "constructionDepartmentProfessionalDirector"));
e.setMajor(FlowUtil.getPullDownInteger(map, "major"));
e.setMajor(FlowUtil.getPullDownManyStr(map, "major"));
baseMapper.insert(e);
}

View File

@ -111,7 +111,8 @@ public class EngineeringSurveyRetestServiceImpl extends ServiceImpl<EngineeringS
e.setProfessionalEngineerDate(FlowUtil.getDate(map,"professionalEngineerDate"));
e.setProjectTeam(FlowUtil.getPullDownLong(map,"projectTeam"));
e.setProjectTeamProfessionalEngineer(FlowUtil.getPullDownLong(map,"projectTeamProfessionalEngineer"));
e.setProjectTeamProfessionalEngineerDate(FlowUtil.getDate(map,"projectTeamProfessionalEngineerDate"));
e.setProjectTeamProfessionalEngineerDate(FlowUtil.getDate(map, "projectTeamProfessionalEngineerDate"));
e.setConstructionContractor(FlowUtil.getPullDownLong(map, "constructionContractor"));
baseMapper.insert(e);
}

View File

@ -2,6 +2,7 @@ package com.zhgd.xmgl.modules.concrete.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.NumberUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.Lists;
@ -37,6 +38,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.sql.Struct;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
@ -70,6 +72,10 @@ public class ConcreteMonitorCurrentDataServiceImpl extends ServiceImpl<ConcreteM
String projectSn = dev.getProjectSn();
if (concreteMonitorCurrentDataVo.getList().size() > 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<ConcreteM
.put("projectSn", MapUtils.getString(param, "projectSn"))
.put("times", times)
.put("devSns", devsns)
.build()).stream().collect(Collectors.groupingBy(ConcreteMonitorCurrentData::getReceiveTime));
.build()).stream().collect(Collectors.groupingBy(data -> data.getDevSn() + ":" + data.getReceiveTime()));
for (BaotouConcreteMonitorCurrentDataVo record : records) {
List<ConcreteMonitorCurrentData> concreteMonitorCurrentDatas = timeMap.get(record.getReceiveTime());
if (concreteMonitorCurrentDatas != null) {
concreteMonitorCurrentDatas.sort((o1, o2) -> o1.getPointNo().compareTo(o2.getPointNo()));
record.setDataList(concreteMonitorCurrentDatas);
List<ConcreteMonitorCurrentData> 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);
}
}
}

View File

@ -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"),
})

View File

@ -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
#邮箱配置