|
|
@ -1,9 +1,7 @@ |
|
|
package com.dreamchaser.depository_manage.service.impl; |
|
|
package com.dreamchaser.depository_manage.service.impl; |
|
|
|
|
|
|
|
|
import com.dreamchaser.depository_manage.entity.Depository; |
|
|
import com.dreamchaser.depository_manage.entity.*; |
|
|
import com.dreamchaser.depository_manage.entity.MaterialAndPlace; |
|
|
import com.dreamchaser.depository_manage.mapper.MaterialMapper; |
|
|
import com.dreamchaser.depository_manage.entity.PidOrDidAndCode; |
|
|
|
|
|
import com.dreamchaser.depository_manage.entity.Place; |
|
|
|
|
|
import com.dreamchaser.depository_manage.mapper.PlaceMapper; |
|
|
import com.dreamchaser.depository_manage.mapper.PlaceMapper; |
|
|
import com.dreamchaser.depository_manage.mapper.QrCodeMapper; |
|
|
import com.dreamchaser.depository_manage.mapper.QrCodeMapper; |
|
|
import com.dreamchaser.depository_manage.pojo.MaterialAndPlaceForView; |
|
|
import com.dreamchaser.depository_manage.pojo.MaterialAndPlaceForView; |
|
|
@ -31,6 +29,9 @@ public class PlaceServiceImpl implements PlaceService { |
|
|
@Autowired |
|
|
@Autowired |
|
|
QrCodeMapper qrCodeMapper; |
|
|
QrCodeMapper qrCodeMapper; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
MaterialMapper materialMapper; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 查找所有库位 |
|
|
* 查找所有库位 |
|
|
* @return |
|
|
* @return |
|
|
@ -200,17 +201,18 @@ public class PlaceServiceImpl implements PlaceService { |
|
|
Map<String,Object> map = new HashMap<>(); |
|
|
Map<String,Object> map = new HashMap<>(); |
|
|
map.put("mid",mid); |
|
|
map.put("mid",mid); |
|
|
map.put("did",depositoryId); |
|
|
map.put("did",depositoryId); |
|
|
|
|
|
Inventory inventoryById = materialMapper.findInventoryById(mid); |
|
|
List<Place> placeByCondition = placeMapper.findPlaceByMidAndDid(map); |
|
|
List<Place> placeByCondition = placeMapper.findPlaceByMidAndDid(map); |
|
|
List<PlaceP> placePList = new ArrayList<>(); |
|
|
List<PlaceP> placePList = new ArrayList<>(); |
|
|
for (int i = 0; i < placeByCondition.size(); i++) { |
|
|
for (Place place : placeByCondition) { |
|
|
Place place = placeByCondition.get(i); |
|
|
|
|
|
PlaceP pp = new PlaceP(place); |
|
|
PlaceP pp = new PlaceP(place); |
|
|
Integer did = place.getDid(); |
|
|
Integer did = place.getDid(); |
|
|
if (did != 0) { |
|
|
if (did != 0) { |
|
|
Depository depositoryRecordById = depositoryService.findDepositoryById(did); |
|
|
Depository depositoryRecordById = depositoryService.findDepositoryById(did); |
|
|
pp.setDepositoryName(depositoryRecordById.getDname()); |
|
|
pp.setDepositoryName(depositoryRecordById.getDname()); |
|
|
} else { |
|
|
} else { |
|
|
pp.setDepositoryName("默认库位"); |
|
|
Depository depositoryById = depositoryService.findDepositoryById(inventoryById.getDepositoryId()); |
|
|
|
|
|
pp.setDepositoryName(depositoryById.getDname()); |
|
|
} |
|
|
} |
|
|
placePList.add(pp); |
|
|
placePList.add(pp); |
|
|
} |
|
|
} |
|
|
|