| | |
| | | package com.vci.ubcs.log.entity; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author ludc |
| | | * @date 2023/10/31 15:43 |
| | | */ |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class SystemLog { |
| | | |
| | | /** |
| | |
| | | import com.vci.ubcs.core.log.service.ILogSystemService; |
| | | import com.vci.ubcs.log.entity.SystemLog; |
| | | import com.vci.ubcs.resource.bo.FileObjectBO; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.io.File; |
| | | import java.rmi.ServerException; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | public class LogSystemServiceImpl implements ILogSystemService { |
| | | |
| | | /** |
| | | * 各个服务存放的的父路径 |
| | | */ |
| | | private final String parentPath = "/data1/ubcs/ubcs-server"; |
| | | //@Value("#{'${ip-whitelist.ip}'.split(',')}") |
| | | private List<String> serviceDirNames = new ArrayList<>(Arrays.asList("/ubcs_code/target/log","/ubcs_omd/target/log","/ubcs_system/target/log")); |
| | | |
| | | /** |
| | | * 获取本地日志列表 |
| | | */ |
| | | @Override |
| | | public List<SystemLog> getSystemLogList() { |
| | | serviceDirNames.stream().forEach(serviceDirName->{ |
| | | File file = new File(parentPath+serviceDirName); |
| | | |
| | | if(file.isDirectory()){ |
| | | |
| | | File[] files = file.listFiles(); |
| | | |
| | | for(File f : files){ |
| | | |
| | | if(f.isDirectory()){ |
| | | |
| | | //readAllFiles(f.getAbsolutePath()); |
| | | |
| | | }else{ |
| | | |
| | | System.out.println(f.getName()); |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | }else{ |
| | | |
| | | System.out.println(file.getName()); |
| | | |
| | | } |
| | | |
| | | }); |
| | | |
| | | return null; |
| | | } |
| | |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | }); |
| | | tree.setOid((String)oidValues.stream().collect(Collectors.joining(wrapperOptions.getOidValueSep()))); |
| | | tree.setName((String) VciBaseUtil.getValueFromField("name", doObject)); |
| | | tree.setCount("【"+(String)VciBaseUtil.getValueFromField("total", doObject)+"】"); |
| | | String total = (String) VciBaseUtil.getValueFromField("total", doObject); |
| | | if(Func.isNotEmpty(total)){ |
| | | tree.setCount("【"+total+"】"); |
| | | } |
| | | if (f != null) { |
| | | tree.setText((String)f.apply(doObject)); |
| | | } else { |
| | |
| | | * |
| | | * @return 数据集合 |
| | | */ |
| | | List<CodeClassify> selectCodeClassifyDOByTree(@Param("id") String id,@Param("lcstatus") String lcstatus,@Param("parentcodeclassifyoid") String parentcodeclassifyoid,@Param("tenantId") String tenantId,@Param("tableName") String tableName); |
| | | List<CodeClassify> selectCodeClassifyDOByTree(@Param("id") String id,@Param("lcstatus") String lcstatus,@Param("parentcodeclassifyoid") String parentcodeclassifyoid,@Param("tenantId") String tenantId/*,@Param("tableName") String tableName*/); |
| | | |
| | | /** |
| | | * 查询数据与PL_CODE_KEYATTRREPEAT、PL_CODE_RESEMBLERULE、PL_CODE_RULE联查 |
| | |
| | | lcStatus = treeQueryObject.getConditionMap().getOrDefault("lcStatus",null); |
| | | } |
| | | if(StringUtils.isNotBlank(id) || StringUtils.isNotBlank(lcStatus) ){ |
| | | String tableName = this.getTableName(treeQueryObject.getConditionMap().get("btmTypeId"),treeQueryObject.getConditionMap().get("id"), treeQueryObject.getConditionMap().get("lcStatus")); |
| | | //String tableName = this.getTableName(treeQueryObject.getConditionMap().get("btmTypeId"),treeQueryObject.getConditionMap().get("id"), treeQueryObject.getConditionMap().get("lcStatus")); |
| | | doList = codeClassifyMapper |
| | | .selectCodeClassifyDOByTree( |
| | | treeQueryObject.getConditionMap().get("id"), |
| | | treeQueryObject.getConditionMap().get("lcStatus"), |
| | | treeQueryObject.getParentOid(), |
| | | VciBaseUtil.checkAdminTenant() ? null:AuthUtil.getTenantId(), |
| | | tableName |
| | | VciBaseUtil.checkAdminTenant() ? null:AuthUtil.getTenantId() |
| | | /*tableName*/ |
| | | ); |
| | | }else{ |
| | | // 只要前端会传参数过来就不会出现走这句的情况,所以查询总数没在这儿添加 |
| | |
| | | codeclassify0.TENANT_ID as tenantId , |
| | | coderuleoid.name as codeRuleOidName, |
| | | codekeyattrrepeatoid.name as codeKeyAttrRepeatOidName, |
| | | coderesembleruleoid.name as codeResembleRuleOidName, |
| | | ( |
| | | SELECT |
| | | COUNT(*) |
| | | FROM |
| | | ${tableName} |
| | | WHERE |
| | | CODECLSFID IN ( |
| | | SELECT |
| | | oid |
| | | FROM |
| | | PL_CODE_CLASSIFY |
| | | WHERE |
| | | lcstatus = 'Enabled' |
| | | START WITH |
| | | OID = codeclassify0.OID |
| | | CONNECT BY |
| | | PRIOR OID = parentCodeClassifyOid |
| | | ) |
| | | AND lastr = '1' |
| | | AND lastv = '1' |
| | | ) AS total |
| | | coderesembleruleoid.name as codeResembleRuleOidName |
| | | from pl_code_classify codeclassify0 |
| | | left join pl_code_rule coderuleoid |
| | | on codeclassify0.codeRuleOid = coderuleoid.oid |