Browse Source

打包时生成git版本库信息

FanQun 2 years ago
parent
commit
fbad4dda7e

+ 8 - 0
pom.xml

@@ -25,6 +25,10 @@
     </properties>
 
     <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
         <dependency>
             <groupId>com.github.xiaoymin</groupId>
             <artifactId>knife4j-spring-boot-starter</artifactId>
@@ -147,6 +151,10 @@
 
     <build>
         <plugins>
+            <plugin>
+                <groupId>pl.project13.maven</groupId>
+                <artifactId>git-commit-id-plugin</artifactId>
+            </plugin>
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>

+ 5 - 4
src/main/java/com/rshy/project/hy/manager/impl/RshyJkManagerImpl.java

@@ -227,11 +227,12 @@ public class RshyJkManagerImpl implements RshyJkManager {
         //人车核录核查结果
         String hcjg = resultDTO.getPctrchlDTO() == null ? "" : resultDTO.getPctrchlDTO().getHcjg();
 
-        boolean hsenable = Boolean.parseBoolean(environment.getProperty("zmt.hshy", "true"));
+        boolean hsEnable = Boolean.parseBoolean(environment.getProperty("zmt.hshy", "true"));
 
-        if (hsenable && rshyVo.getNucleic_acid().getStatus() == 0) {
+        if (hsEnable && rshyVo.getNucleic_acid().getStatus() == 0) {
+            //核酸不符合防疫要求
             rshyVo.setPassStatus(PassStatusEnum.NON_CONFORMANCE).setKind(PassStatusEnum.NON_CONFORMANCE.getDesc()).setWarning(PassStatusEnum.NON_CONFORMANCE.getDesc());
-        } else if (hsenable && rshyVo.getTravel_card() != 0) {
+        } else if (hsEnable && rshyVo.getTravel_card() != 0) {
             //行程码到过中高风险地区
             rshyVo.setPassStatus(PassStatusEnum.ABNORMAL_TRAVEL_CARD).setKind(PassStatusEnum.ABNORMAL_TRAVEL_CARD.getDesc());
         } else if (jkmInfo != null && PassStatusEnum.RED_CODE.getDesc().equalsIgnoreCase(jkmInfo.getColor_code_label())) {
@@ -362,7 +363,7 @@ public class RshyJkManagerImpl implements RshyJkManager {
 
         if (pcthsResultDTO.getYU_CJSJ() != null) {
             DateTime parse = DateUtil.date(Long.parseLong(pcthsResultDTO.getYU_CJSJ()) * 1000);
-            log.info("最近一次核酸采样时间: {}", parse.toString());
+            log.info("{} {} 最近一次核酸采样时间: {}", pcthsResultDTO.getGMSFHM(), pcthsResultDTO.getXM(), parse.toString());
             long betweenMs = DateUtil.betweenMs(parse, DateUtil.date());
             //72h防疫规则
             if (betweenMs > 72 * 60 * 60 * 1000) {

+ 0 - 5
src/main/java/com/rshy/project/hy/web/controller/RshyController.java

@@ -46,11 +46,6 @@ public class RshyController {
     @Resource
     private IdentityService identityService;
 
-    @GetMapping(value = "/version")
-    public String version() {
-        return "1.2.4.220614";
-    }
-
     @ApiOperation("普通核验模式")
     //@NoRepeatSubmit
     @PostMapping("getRyhyInfo")