Commit f9e7ac2b authored by tianbo's avatar tianbo

feat(jg): 添加应用初始化和气瓶登记功能

- 添加应用启动时的初始化方法,用于清理Redis缓存、获取平台令牌和创建审批树 - 在通用转换器中为西安电梯导入添加默认监管部门代码的注释说明 - 添加气瓶类型枚举并在设备数据处理服务中实现普通气瓶登记机关信息的特殊处理逻辑
parent c8210c55
......@@ -158,7 +158,7 @@ public class CommonCustomConverter {
}
LinkedHashMap<String, Object> company = findAllCompaniesByPartialPath(name);
if (company == null) {
return "610100";
return "610100"; // 针对西安电梯导入没有属地监管部门则默认给西安市场监督管理局
}
return company.get("companyCode").toString();
}
......
package com.yeejoin.amos;
import com.yeejoin.amos.boot.biz.common.utils.oConvertUtils;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.CommonServiceImpl;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.StartPlatformTokenService;
import com.yeejoin.amos.boot.module.jg.biz.utils.RedisUtil;
import net.javacrumbs.shedlock.spring.annotation.EnableSchedulerLock;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
......@@ -13,12 +17,14 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
import java.net.InetAddress;
import java.net.UnknownHostException;
......@@ -47,6 +53,14 @@ import java.net.UnknownHostException;
public class AmosJGApplication {
private static final Logger logger = LoggerFactory.getLogger(AmosJGApplication.class);
@Autowired
private CommonServiceImpl commonService;
@Autowired
private StartPlatformTokenService startPlatformTokenService;
@Autowired
RedisUtil redisUtil;
public static void main(String[] args) throws UnknownHostException {
ConfigurableApplicationContext context = SpringApplication.run(AmosJGApplication.class, args);
......@@ -59,4 +73,10 @@ public class AmosJGApplication {
+ path + "/doc.html\n" + "----------------------------------------------------------\n");
}
@Bean
public void init() {
redisUtil.del("ADMINISTRATION_UNIT_TREE");
startPlatformTokenService.getToken();
commonService.creatApproveTree();
}
}
......@@ -23,6 +23,7 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory;
import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto;
import com.yeejoin.amos.boot.module.common.api.dto.IBaseChangeData;
import com.yeejoin.amos.boot.module.common.api.enums.CylinderTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.common.PipLenCalUtils;
import com.yeejoin.amos.boot.module.jg.api.dto.*;
import com.yeejoin.amos.boot.module.jg.api.entity.IdxBizJgPipelineOperationHist;
......@@ -837,6 +838,11 @@ public class CommonEquipDataProcessService {
}
}
}
// 普通气瓶的登记机关和登记日期从增补当时的单据信息取
if (CylinderTypeEnum.CYLINDER.getCode().equals(registerInfo.getEquCategory()) && "0".equals(registerInfo.getWhetherVehicleCylinder())) {
// result.put("receiveCompanyCode", "");
// result.put("O_REG_DATE", "");
}
// 返回当前登录人单位类型(企业还是监管、审批)
result.put("loginUnitType", commonService.getSelectedOrgInfo().getCompany().getLevel());
// 返回是否做过除历史登记外的其他业务
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment