Browse Source

仪表优化

3254194295 5 months ago
parent
commit
033abd2048

+ 4 - 1
platform-dao/src/main/java/com/platform/dao/enums/SbInfoStatusEnum.java

@@ -65,7 +65,10 @@ public enum SbInfoStatusEnum {
     /**
      * 已退库
      */
-    IN_BACK(13, "已退库");
+    IN_BACK(13, "已退库"),
+    DIAO_BO(45, "调拨"),
+    WAI_XIAO(46, "外销")
+    ;
 
     private final Integer value;
     private final String name;

+ 3 - 1
platform-dao/src/main/java/com/platform/dao/enums/SbMeasureLogOtherTypeEnum.java

@@ -63,7 +63,9 @@ public enum SbMeasureLogOtherTypeEnum {
      * 启用
      */
     IN_USE(21),
-    OUT_STORE(22)
+    OUT_STORE(22),
+    DIAO_BO(23),//调拨
+    WAI_XIAO(24)//外销
     ;
 
 

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

@@ -156,7 +156,13 @@ public class SbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, SbInfo, SbI
             SbMeasureLog log = new SbMeasureLog();
             log.setSbId(item);
             log.setId(IdGeneratorUtils.getObjectId());
-            log.setOtherType(SbMeasureLogOtherTypeEnum.OUT_STORE.getValue());
+            if(sbInfoDTO.getStatus()==SbInfoStatusEnum.IN_USE.getValue()) {
+                log.setOtherType(SbMeasureLogOtherTypeEnum.OUT_STORE.getValue());
+            }else if (sbInfoDTO.getStatus()==SbInfoStatusEnum.DIAO_BO.getValue()) {
+                log.setOtherType(SbMeasureLogOtherTypeEnum.DIAO_BO.getValue());
+            }else if (sbInfoDTO.getStatus()==SbInfoStatusEnum.WAI_XIAO.getValue()) {
+                log.setOtherType(SbMeasureLogOtherTypeEnum.WAI_XIAO.getValue());
+            }
 
             log.setContent(sbInfoDTO.getRemark());
             log.setCreatedTime(LocalDateTime.now());