rev:同步按钮添加spring获取

This commit is contained in:
zhangzhiqiang
2023-06-14 10:52:05 +08:00
parent 3c34900441
commit bd7489ca0c

View File

@@ -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<String> rfType = dictDetailRepository.findByDictName("MD_MATERIAL_WASTE_TYPE").stream().map(DictDetail::getValue).collect(Collectors.toList());
DictDetailRepository bean = SpringContextHolder.getBean(DictDetailRepository.class);
List<String> 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();