소스 검색

配车出现store.getLockFlag()为空的情况,增加一次赋值操作

Zhangqy 2 달 전
부모
커밋
e753f2d37a
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5
    1
      src/main/java/com/th/demo/service/impl/ware/DistributionServiceImpl.java

+ 5
- 1
src/main/java/com/th/demo/service/impl/ware/DistributionServiceImpl.java 파일 보기

@@ -108,7 +108,11 @@ public class DistributionServiceImpl implements DistributionService {
108 108
         Distribution distribution1 = distributionMapper.selectByTruckNo(distribution.getTruckNo(), belongId);
109 109
         for (int i = 0; i < list.size(); i++) {
110 110
             Store store = storeMapper.selectByPrimaryKey(list.get(i).getId());
111
-            if (!store.getLockFlag().equals("1") && distribution1.getId()!= null && !distribution1.getId().equals("")){
111
+            // 存在赋值为空的情况,追加一次赋值
112
+            if (store.getLockFlag() == null || store.getLockFlag() == ""){
113
+                store.setLockFlag("0");
114
+            }
115
+            if (!store.getLockFlag().equals("1") && distribution1.getId() != null && distribution1.getId() != ""){
112 116
                 list.get(i).setLockFlag("1");
113 117
                 num += storeMapper.updateByPrimaryKey(list.get(i));
114 118
                 DistributionDetail detail = getDistributionDetail(distribution1, list.get(i), userId, belongId);

Loading…
취소
저장