Selaa lähdekoodia

修改储备质量市州

hjc 1 vuosi sitten
vanhempi
commit
b807dce1f7

+ 21 - 19
unis-plugin/unis-plugin-biz/src/main/java/com/unis/mobileInfo/modular/qcqualityinspection/service/impl/BusinessQcQualityInspectionServiceImpl.java

@@ -203,34 +203,36 @@ public class BusinessQcQualityInspectionServiceImpl extends ServiceImpl<Business
203 203
                 //不收集
204 204
                 ReserveQualityCityPageVO noPassVo = businessQcQualityInspectionMapper.selectCityNoPassByCityName(pageParam.getCityName());
205 205
 
206
-                if (StringUtils.isEmpty(passVo.getCityId())){
206
+                if (StringUtils.isEmpty(passVo.getCityId())) {
207 207
                     noPassVo.setPassNum(passVo.getPassNum());
208 208
                     list.add(noPassVo);
209
-                }else {
210
-                  passVo.setNoPassNum(noPassVo.getNoPassNum());
211
-                  list.add(passVo);
209
+                } else {
210
+                    passVo.setNoPassNum(noPassVo.getNoPassNum());
211
+                    list.add(passVo);
212 212
                 }
213 213
 
214
-
215
-
216
-
217 214
             } else {
218 215
                 //非条件查询
219 216
                 List<String> cityIdList = reserveQualityCityPageVOList.stream().map(ReserveQualityCityPageVO::getCityId).collect(Collectors.toList());
220
-                for (String cityId : cityIdList) {
221
-
222
-                    com.unis.basic.info.modular.unitInfo.entity.BasicEnum basicEnum = enumMapper.selectById(cityId);
223
-                    //收集合格总数
224
-                    ReserveQualityCityPageVO passVo = businessQcQualityInspectionMapper.selectCityPass(cityId);
225
-                    //不收集
226
-                    ReserveQualityCityPageVO noPassVo = businessQcQualityInspectionMapper.selectCityNoPass(cityId);
227
-
228
-                    noPassVo.setPassNum(passVo.getPassNum());
229
-                    noPassVo.setCityId(cityId);
230
-                    noPassVo.setCityName(basicEnum.getDictLabel());
231
-                    list.add(noPassVo);
217
+                if (CollectionUtil.isNotEmpty(cityIdList)) {
218
+                    for (String cityId : cityIdList) {
219
+
220
+                        com.unis.basic.info.modular.unitInfo.entity.BasicEnum basicEnum = enumMapper.selectById(cityId);
221
+                        //收集合格总数
222
+                        ReserveQualityCityPageVO passVo = businessQcQualityInspectionMapper.selectCityPass(cityId);
223
+                        //不收集
224
+                        ReserveQualityCityPageVO noPassVo = businessQcQualityInspectionMapper.selectCityNoPass(cityId);
225
+
226
+                        noPassVo.setPassNum(passVo.getPassNum());
227
+                        noPassVo.setCityId(cityId);
228
+                        if (ObjectUtil.isNotEmpty(basicEnum)) {
229
+                            noPassVo.setCityName(basicEnum.getDictLabel());
230
+                        }
231
+                        list.add(noPassVo);
232
+                    }
232 233
                 }
233 234
 
235
+
234 236
             }
235 237
         }
236 238
         page.setTotal(list.size());