ソースを参照

fix:PDSC, 问题修复

zhangkai 2 ヶ月 前
コミット
3b6afbfce8

+ 1 - 1
nationrel-module-pdsc-api/src/main/java/com/nationrel/modules/pdsc/entity/PdscDefectConfine.java

@@ -79,7 +79,7 @@ public class PdscDefectConfine implements Serializable {
     @Excel(name = "黄色规格上限", width = 15)
     @Schema(description = "黄色规格上限")
     @TableField(updateStrategy = FieldStrategy.IGNORED)
-    private Integer yellowUpper;
+    private BigDecimal yellowUpper;
     /**
      * 绿色规格上限
      */

+ 6 - 6
nationrel-module-pdsc-biz/src/main/java/com/nationrel/modules/pdsc/service/impl/ProjectInfoPdscServiceImpl.java

@@ -341,18 +341,18 @@ public class ProjectInfoPdscServiceImpl extends ServiceImpl<ProjectInfoPdscMappe
                 BigDecimal minValue = actualPerformanceVo.getMinValue();
                 if (ObjectUtil.isNotNull(yellowUpper) && ObjectUtil.isNotNull(greenUpper) && ObjectUtil.isNotNull(yellowLower)
                         && ObjectUtil.isNotNull(greenLower) && ObjectUtil.isNotNull(maxValue) && ObjectUtil.isNotNull(minValue)) {
-                    Integer upperColor = 1;
-                    if (maxValue.compareTo(greenUpper) < 0 && maxValue.compareTo(greenUpper) == 0) {
+                    int upperColor = 1;
+                    if (maxValue.compareTo(greenUpper) < 1) {
                         upperColor = 1;
-                    } else if (maxValue.compareTo(yellowUpper) < 0 && maxValue.compareTo(yellowUpper) == 0) {
+                    } else if (maxValue.compareTo(yellowUpper) < 1) {
                         upperColor = 2;
                     } else if (maxValue.compareTo(yellowUpper) > 0) {
                         upperColor = 3;
                     }
-                    Integer lowerColor = 1;
-                    if (minValue.compareTo(greenLower) > 0 && minValue.compareTo(greenLower) == 0) {
+                    int lowerColor = 1;
+                    if (minValue.compareTo(greenLower) > -1) {
                         lowerColor = 1;
-                    } else if (minValue.compareTo(yellowLower) > 0 && minValue.compareTo(yellowLower) == 0) {
+                    } else if (minValue.compareTo(yellowLower) > -1) {
                         lowerColor = 2;
                     } else if (minValue.compareTo(yellowLower) < 0) {
                         lowerColor = 3;