diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/pdm/service/impl/WastecchangeServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/pdm/service/impl/WastecchangeServiceImpl.java index 936da453..1e4b32d8 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/pdm/service/impl/WastecchangeServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/pdm/service/impl/WastecchangeServiceImpl.java @@ -15,6 +15,7 @@ import org.nl.exception.BadRequestException; import org.nl.modules.system.domain.DictDetail; import org.nl.modules.system.repository.DictDetailRepository; import org.nl.modules.system.service.DictDetailService; +import org.nl.utils.SpringContextHolder; import org.nl.wms.basedata.master.constant.MaterOptTypeEnum; import org.nl.wms.basedata.pdm.service.WastecchangeService; import org.nl.wms.basedata.pdm.service.dto.WastecchangeDto; @@ -254,7 +255,8 @@ public class WastecchangeServiceImpl implements WastecchangeService { @Transactional(rollbackFor = Exception.class) public JSONArray contentShift(JSONObject json) { - List rfType = dictDetailRepository.findByDictName("MD_MATERIAL_WASTE_TYPE").stream().map(DictDetail::getValue).collect(Collectors.toList()); + DictDetailRepository bean = SpringContextHolder.getBean(DictDetailRepository.class); + List rfType = bean.findByDictName("MD_MATERIAL_WASTE_TYPE").stream().map(DictDetail::getValue).collect(Collectors.toList()); JSONArray rf_arr = new JSONArray(); rfType.forEach(a->{ JSONObject json_CF = new JSONObject();