包头bug修复

This commit is contained in:
guoshengxiong 2025-01-17 18:33:45 +08:00
parent 8580bdb1a9
commit 0b4d8997b1
7 changed files with 114 additions and 48 deletions

View File

@ -95,16 +95,6 @@ public class DataScopeHandler implements DataPermissionHandler {
@Lazy
@Autowired
private ISystemUserService systemUserService;
//protected Expression getProjectSn(Object engineeringSn){
// SecurityUser user = SecurityUtil.getUser();
// if (user.getAccountType() == 4) {
// return new StringValue(user.getSn());
// }
// if (user.getAccountType() == 3) {
// return new StringValue(engineeringService.getOne(Wrappers.<Engineering>lambdaQuery().eq(Engineering::getEngineeringSn, engineeringSn)).getProjectSn());
// }
// return null;
//}
@Lazy
@Autowired
private IUserDeviceService userDeviceService;
@ -117,10 +107,6 @@ public class DataScopeHandler implements DataPermissionHandler {
return null;
}
protected String getEngineeringSn() {
return "engineering_sn";
}
protected String getProjectSn() {
return "project_sn";
}
@ -158,6 +144,11 @@ public class DataScopeHandler implements DataPermissionHandler {
return tables;
}
/**
* 合作单位ids设备
*
* @return
*/
private HashMap<String, String> getFieldEnterpriseIdsTables() {
HashMap<String, String> tables = new HashMap<>(16);
tables.put("ai_analyse_hard_ware_record", "enterprise_ids");
@ -205,12 +196,22 @@ public class DataScopeHandler implements DataPermissionHandler {
return tables;
}
/**
* 视频监控
*
* @return
*/
private HashMap<String, String> getFieldVideoTables() {
HashMap<String, String> tables = new HashMap<>(16);
tables.put("video_item", "item_id");
return tables;
}
/**
* 合作单位ids设备的数据
*
* @return
*/
private HashMap<String, Map<String, Object>> getFieldEnterpriseDataTables() {
HashMap<String, Map<String, Object>> tables = new HashMap<>(16);
tables.put("car_pass_record", new MapBuilder<String, Object>().put(DATA_COLUMN, "camera_id").put(DEV_FIELD, "cameraId").put(DEV_MAPPER, CarCameraMapper.class).build());
@ -277,36 +278,43 @@ public class DataScopeHandler implements DataPermissionHandler {
return tables;
}
/**
* 项目组
* ai预警
*
* @return
*/
private HashMap<String, String> getFieldGroupsTables() {
HashMap<String, String> tables = new HashMap<>(16);
tables.put("danger_environment_evaluate", "project_group_id");
tables.put("project_group", "id");
return tables;
}
/**
* 装置
*
* @return
*/
private HashMap<String, String> getFieldDevUnitTables() {
HashMap<String, String> tables = new HashMap<>(16);
tables.put("danger_environment_evaluate", "device_id");
tables.put("device_unit", "id");
return tables;
}
private HashMap<String, String> getFieldAiTables() {
HashMap<String, String> tables = new HashMap<>(16);
tables.put("ai_analyse_hard_ware_alarm_record", "hardware_id");
return tables;
}
// /**
// * 项目组
// *
// * @return
// */
// private HashMap<String, String> getFieldGroupsTables() {
// HashMap<String, String> tables = new HashMap<>(16);
// tables.put("danger_environment_evaluate", "project_group_id");
// tables.put("project_group", "id");
// return tables;
// }
// /**
// * 装置
// *
// * @return
// */
// private HashMap<String, String> getFieldDevUnitTables() {
// HashMap<String, String> tables = new HashMap<>(16);
// tables.put("danger_environment_evaluate", "device_id");
// tables.put("device_unit", "id");
// return tables;
// }
// private HashMap<String, String> getFieldSecurityTables() {
// HashMap<String, String> tables = new HashMap<>(16);
// tables.put("xz_security_quality_inspection_record", "device_unit_id");
@ -370,7 +378,7 @@ public class DataScopeHandler implements DataPermissionHandler {
}
}
}
//合作单位ids数据
//合作单位ids设备的数据
List<Map<String, Object>> devIdNames = getNeedFilterLeftExpression(plainSelect, ds, this.getFieldEnterpriseDataTables());
if (CollUtil.isNotEmpty(devIdNames)) {
for (Map<String, Object> item : devIdNames) {

View File

@ -13,7 +13,7 @@ import org.jeecgframework.poi.excel.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* @Description: 绿色施工方案管理
* @Description: 危大工程清单
* @author pds
* @date 2024-08-24
* @version V1.0
@ -52,9 +52,49 @@ public class GreenConstructionScheme implements Serializable {
/**更新时间*/
@ApiModelProperty(value="更新时间")
private java.util.Date updateDate ;
/**模板**/
/**装置*/
@ApiModelProperty(value="装置")
private java.lang.Long deviceUnit ;
/**
* 项目组
*/
@ApiModelProperty(value = "项目组")
private java.lang.Long projectGroup;
/**
* 监理单位
*/
@ApiModelProperty(value = "监理单位")
private java.lang.Long supervisingUnit;
/**
* EPC承包商
*/
@ApiModelProperty(value = "EPC承包商")
private java.lang.Long epcContractor;
/**
* 施工单位
*/
@ApiModelProperty(value = "施工单位")
private java.lang.Long constructionUnit;
@TableField(exist = false)
@ApiModelProperty(value = "装置名称")
private java.lang.String deviceUnitName;
@TableField(exist = false)
@ApiModelProperty(value = "项目组名称")
private java.lang.String projectGroupName;
@TableField(exist = false)
@ApiModelProperty(value = "监理单位名称")
private java.lang.String supervisingUnitName;
@TableField(exist = false)
@ApiModelProperty(value = "EPC承包商名称")
private java.lang.String epcContractorName;
@TableField(exist = false)
@ApiModelProperty(value = "施工单位名称")
private java.lang.String constructionUnitName;
@TableField(exist = false)
/**承包商名称*/
@Excel(name = "承包商名称", width = 15)
@ApiModelProperty(value="承包商名称")
private java.lang.String contractorName ;
}

View File

@ -85,7 +85,6 @@ public class SceneExposeSpecial implements Serializable {
@ApiModelProperty(value = "附件")
private String fileUrl;
/**模板**/
/**
* 项目组
*/

View File

@ -20,7 +20,6 @@ public class NoticeUnit implements Serializable {
@ApiModelProperty(value = "项目sn")
private String projectSn;
/**模板**/
/**
* 项目组
*/

View File

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhgd.annotation.DataScope;
import com.zhgd.xmgl.modules.baotou.entity.GreenConstructionScheme;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -18,6 +19,7 @@ import java.util.List;
* @version V1.0
*/
@Mapper
@DataScope(includeTable = "green_construction_scheme")
public interface GreenConstructionSchemeMapper extends BaseMapper<GreenConstructionScheme> {
List<GreenConstructionScheme> queryList(@Param(Constants.WRAPPER)QueryWrapper<GreenConstructionScheme> queryWrapper);

View File

@ -1,21 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zhgd.xmgl.modules.baotou.mapper.GreenConstructionSchemeMapper">
<select id="queryList" resultType="com.zhgd.xmgl.modules.baotou.entity.GreenConstructionScheme">
select * from (select t.*,
ei.enterprise_name as contractor_name
select * from (
select t.*
,du.device_unit_name as device_unit_name
,pg.project_group_name as project_group_name
,ei1.enterprise_name as supervising_unit_name
,ei2.enterprise_name as epc_contractor_name
,ei3.enterprise_name as construction_unit_name
from green_construction_scheme t
left join enterprise_info ei on ei.id=t.contractor_id
left join device_unit du on du.id = t.device_unit
left join project_group pg on pg.id=t.project_group
left join enterprise_info ei1 on ei1.id=t.supervising_unit
left join enterprise_info ei2 on ei2.id=t.epc_contractor
left join enterprise_info ei3 on ei3.id=t.construction_unit
)t
${ew.customSqlSegment}
</select>
<select id="queryById" resultType="com.zhgd.xmgl.modules.baotou.entity.GreenConstructionScheme">
select * from (select t.*,
ei.enterprise_name as contractor_name
select * from (
select t.*
,du.device_unit_name as device_unit_name
,pg.project_group_name as project_group_name
,ei1.enterprise_name as supervising_unit_name
,ei2.enterprise_name as epc_contractor_name
,ei3.enterprise_name as construction_unit_name
from green_construction_scheme t
left join enterprise_info ei on ei.id=t.contractor_id
left join device_unit du on du.id = t.device_unit
left join project_group pg on pg.id=t.project_group
left join enterprise_info ei1 on ei1.id=t.supervising_unit
left join enterprise_info ei2 on ei2.id=t.epc_contractor
left join enterprise_info ei3 on ei3.id=t.construction_unit
)t
where t.id=#{id}
</select>

View File

@ -9,6 +9,7 @@ import com.documents4j.api.IConverter;
import com.documents4j.job.LocalConverter;
import com.zhgd.xmgl.modules.basicdata.entity.SystemUser;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
import javax.servlet.http.HttpServletResponse;
@ -125,7 +126,7 @@ public class EasyPoiUtil {
}
}
} else if (osName.contains("nux") || osName.contains("nix")) {
File pdfFile = new File(tempFile.getPath(), tempFile.getName() + ".pdf");
File pdfFile = new File(tempFile.getParent(), StringUtils.substringBeforeLast(tempFile.getName(),".") + ".pdf");
log.info("linux环境开始导出pdf源文件{},目标文件:{}", tempFile.getAbsolutePath(), pdfFile.getAbsolutePath());
linuxWordToPdf(pdfFile, tempFile);
try {