преди 1 година
родител
ревизия
56e42e4c67
променени са 1 файла, в които са добавени 7 реда и са изтрити 2 реда
  1. 7 2
      platform-rest/src/main/java/com/platform/rest/controller/sb/SbUpdateLogController.java

+ 7 - 2
platform-rest/src/main/java/com/platform/rest/controller/sb/SbUpdateLogController.java

@@ -64,11 +64,16 @@ public class SbUpdateLogController {
         dto.setId(IdGeneratorUtils.getObjectId());
         SbMeasureLog log = BeanConverterUtil.copyObjectProperties(dto,SbMeasureLog.class);
         sbMeasureLogMapper.insert(log);
-        if (dto.getOtherType()!=null&&dto.getOtherType().equals(SbMeasureLogOtherTypeEnum.IN_STORE.getValue())){
+        if (dto.getOtherType()!=null&&(dto.getOtherType().equals(SbMeasureLogOtherTypeEnum.IN_STORE.getValue()) ||
+                dto.getOtherType().equals(SbMeasureLogOtherTypeEnum.BAO_FEI.getValue())  )){
             SbInfo sbInfo = new SbInfo();
             sbInfo.setPositionNo("暂无");
             sbInfo.setPositionNo(dto.getSbId());
-            sbInfo.setStatus(SbInfoStatusEnum.IN_STORE.getValue());
+            if (dto.getOtherType().equals(SbMeasureLogOtherTypeEnum.IN_STORE.getValue())) {
+                sbInfo.setStatus(SbInfoStatusEnum.IN_STORE.getValue());
+            }else if (dto.getOtherType().equals(SbMeasureLogOtherTypeEnum.BAO_FEI.getValue())){
+                sbInfo.setStatus(SbInfoStatusEnum.SCRAPED.getValue());
+            }
             sbInfoMapper.updateByPrimaryKeySelective(sbInfo);
         }
         return new R<>();