处理dubbo没有provider

This commit is contained in:
zhanyunjiu
2022-08-15 15:58:08 +08:00
parent c903ff31e3
commit 2072a3cbc9
2 changed files with 17 additions and 4 deletions
@@ -17,6 +17,7 @@ import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
@@ -95,10 +96,18 @@ public class CropServiceImpl implements CropService {
} }
public List<ErpMaterialDTO> getMaterialList(){ public List<ErpMaterialDTO> getMaterialList(){
List<JSONObject> list = openErpService.getMaterialList(); List<ErpMaterialDTO> materialList = new ArrayList<>();
List<ErpMaterialDTO> materialList = BeanUtil.copyToList( list, ErpMaterialDTO.class); try{
List<JSONObject> list = openErpService.getMaterialList();
materialList = BeanUtil.copyToList( list, ErpMaterialDTO.class);
}catch (Exception e){
e.printStackTrace();
}finally {
return materialList;
}
return materialList;
} }
} }
@@ -308,7 +308,11 @@ public class DiscussServiceImpl implements DiscussService {
.num(new BigDecimal(reqVO.getRecoveryNumber())) .num(new BigDecimal(reqVO.getRecoveryNumber()))
.build(); .build();
log.info("同步到ERP,,{}", intoStock); log.info("同步到ERP,,{}", intoStock);
openErpService.intoStock(Arrays.asList(intoStock) ); try{
openErpService.intoStock(Arrays.asList(intoStock) );
}catch (Exception e){
e.printStackTrace();
}
} }
} }