guarantee-lsq 2 rokov pred
rodič
commit
f1817beb5f

+ 11 - 5
platform-dao/src/main/java/com/platform/dao/vo/export/sb/ExportSbInfoVO.java

@@ -49,7 +49,7 @@ public class ExportSbInfoVO implements Serializable {
     /**
      * 设备等级
      */
-    @Excel(name = "设备等级", orderNum = "6", dicCode="SBINFO_LEVEL")
+    @Excel(name = "设备等级(必填)", orderNum = "6", dicCode="SBINFO_LEVEL")
     private Integer level;
     /**
      * 设备原值
@@ -64,7 +64,7 @@ public class ExportSbInfoVO implements Serializable {
     /**
      * 自定义类型
      */
-    @Excel(name = "自定义类型", orderNum = "9", dicCode="SB_USE_TYPE")
+    @Excel(name = "自定义类型(必填)", orderNum = "9", dicCode="SB_USE_TYPE")
     private Integer useType;
     /**
      * 大小/尺寸
@@ -104,7 +104,7 @@ public class ExportSbInfoVO implements Serializable {
     /**
      * 状态
      */
-    @Excel(name = "状态", orderNum = "17", dicCode="SB_INFO_STATUS")
+    @Excel(name = "状态(必填)", orderNum = "17", dicCode="SB_INFO_STATUS")
     private Integer status;
     /**
      * 备注
@@ -114,7 +114,7 @@ public class ExportSbInfoVO implements Serializable {
     /**
      * 是否子设备
      */
-    @Excel(name = "是否子设备", orderNum = "19", dicCode="SB_IS_CHILD")
+    @Excel(name = "是否子设备(必填)", orderNum = "19", dicCode="SB_IS_CHILD")
     private Integer isChild;
     /**
      * 财务编码/固定资产编号
@@ -149,7 +149,7 @@ public class ExportSbInfoVO implements Serializable {
     /**
      * 固定资产
      */
-    @Excel(name = "固定资产", orderNum = "25", dicCode="SB_IS_FINANCING")
+    @Excel(name = "固定资产(必填)", orderNum = "25", dicCode="SB_IS_FINANCING")
     private Integer isFinancing;
 
     /**
@@ -164,4 +164,10 @@ public class ExportSbInfoVO implements Serializable {
     @Excel(name = "检定单位", orderNum = "27")
     private String dph;
 
+    /**
+     * 是否需要检定
+     */
+    @Excel(name = "是否需要检定(必填)", orderNum = "28", dicCode="YES_NO")
+    private Integer isMeasure;
+
 }

+ 3 - 3
platform-service/src/main/java/com/platform/service/sb/impl/SbInfoServiceImpl.java

@@ -738,7 +738,7 @@ public class SbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, SbInfo, SbI
                         }
                     }*/
                     // 如果计量设备
-                    if(vo.getUseType() == SbUseType.BGCL.getValue()){
+                    if(vo.getUseType() == SbUseType.BGCL.getValue() && vo.getIsMeasure() == YesNoEnum.YES.getValue()){
                         if(vo.getCheckDate() == null && vo.getNextCheckDate() == null){
                             throw new BusinessException("上次和下次检定日期,不能全部为空");
                         }
@@ -2089,8 +2089,8 @@ public class SbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, SbInfo, SbI
                             throw new BusinessException("找不到使用人员,请先添加, 名称" + vo.getSaveUserName());
                         }
                     }
-                    // 如果计量设备
-                    if(vo.getUseType() == SbUseType.BGCL.getValue()){
+                    // 如果计量设备 且是需要检定
+                    if(vo.getUseType() == SbUseType.BGCL.getValue() && vo.getIsMeasure() == YesNoEnum.YES.getValue()){
                         if(vo.getCheckDate() == null && vo.getNextCheckDate() == null){
                             throw new BusinessException("上次和下次检定日期,不能全部为空");
                         }